Add a makefile example

This commit is contained in:
Mathieu Maret 2011-08-31 15:03:34 +02:00
parent d0de8f70b5
commit 06cd611090
1 changed files with 39 additions and 0 deletions

39
models/Makefile Normal file
View 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