Add a makefile example
This commit is contained in:
parent
d0de8f70b5
commit
06cd611090
39
models/Makefile
Normal file
39
models/Makefile
Normal file
@ -0,0 +1,39 @@
|
||||
#################################
|
||||
# Includes globaux et spécifiques
|
||||
#################################
|
||||
#INCLUDES=-I../include
|
||||
|
||||
####################################
|
||||
# Options de compilation spécifiques
|
||||
####################################
|
||||
#CCOPT= -DPUR_LINUX
|
||||
|
||||
#######################
|
||||
# règles de compilation
|
||||
#######################
|
||||
CFLAGS = -Wall -pedantic -Wshadow -ggdb -O2 -Wimplicit -Wreturn-type -Wuninitialized \
|
||||
-Wparentheses -Wpointer-arith
|
||||
|
||||
LDFLAGS = -lpthread
|
||||
|
||||
SRC=$(wildcard *.c)
|
||||
|
||||
#######################
|
||||
# Tâches
|
||||
#######################
|
||||
APPNAME=testapp
|
||||
|
||||
OBJS = $(SRC:.c=.o)
|
||||
|
||||
all: $(APPNAME)
|
||||
|
||||
$(APPNAME): $(OBJS)
|
||||
$(CC) -o $@ $(OBJS) $(LDFLAGS)
|
||||
|
||||
%.o : %.c
|
||||
$(CC) $(CFLAGS) $(INCLUDES) $(CCOPT) -o $@ -c $<
|
||||
|
||||
clean :
|
||||
-rm -f *.o *.a $(APPNAME)
|
||||
|
||||
.PHONY: all clean
|
Loading…
Reference in New Issue
Block a user