Une collection organisée de snippets de code pour accélérer votre développement. Parcourez, recherchez et copiez en un clic.
OBJECTS += another.o
VERSION ?= 1.0
CC = gcc
CURRENT_DIR := $(shell pwd)
DIRS = src include lib
ALL_FILES = $(foreach dir,$(DIRS),$(wildcard $(dir)/*))
OBJECTS := $(patsubst %.c, %.o, $(SOURCES))
SOURCES := $(wildcard *.c)
mon_executable: main.o
$(CC) -o mon_executable main.o
ifeq ($(PARAM),)
$(error La variable PARAM est requise)
endif
ifdef OLD_API
$(warning L'utilisation de OLD_API est dépréciée)
endif
mon_executable: main.o
$(CC) -o $@ main.o
main.o: main.c
$(CC) -c -o $@ $<