| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 | ## CONFIGURATION GENERALE#EXEC = main testOBJETS = str.o json_parser.o json_encoder.o json_array.o error.o arraylist.o server_tcp.o server_udp.o bomberstudent_server.o client.o file.o handler.o player.o game.o delay.o object.oNOM_PROJET = Projet Reseau## SUFFIXES#.SUFFIXES: .c .o## OBJETS#EXEC_O = $(EXEC:=.o)OBJETS_O = $(OBJETS) $(EXEC_O)## ARGUMENTS ET COMPILATEUR#CC = gccCCFLAGS_STD = -Wall -O3 -Werror -ansi -pedantic -std=c11CCFLAGS_DEBUG = -D _DEBUG_CCFLAGS = $(CCFLAGS_STD)CCLIBS = -lm -pthread## REGLES#all: msg $(OBJETS) $(EXEC_O)	@echo "Creation des executables..."	@for i in $(EXEC); do \	$(CC) -o $$i $$i.o $(OBJETS) $(CCLIBS); \	done	@echo "Termine."msg:	@echo "Creation des objets..."debug: CCFLAGS = $(CCFLAGS_STD) $(CCFLAGS_DEBUG)debug: all## REGLES PAR DEFAUT#.c.o: .h	@cd $(dir $<) && ${CC} ${CCFLAGS} -c $(notdir $<) -o $(notdir $@)## REGLES GENERALES#clean:	@echo "Suppresion des objets, des fichiers temporaires..."	@rm -f $(OBJETS) $(EXEC_O)	@rm -f *~ *#	@rm -f $(EXEC)	@rm -f dependances	@rm -f *.log	@echo "Termine."depend:	@echo "Creation des dependances..."	@sed -e "/^# DEPENDANCES/,$$ d" makefile > dependances	@echo "# DEPENDANCES" >> dependances	@for i in $(OBJETS_O); do \	$(CC) -MM -MT $$i $(CCFLAGS) `echo $$i | sed "s/\(.*\)\\.o$$/\1.c/"` >> dependances; \	done	@cat dependances > makefile	@rm dependances	@echo "Termine."	rmlog:	@echo "Suppresion des fichiers de log"	@rm -f *.log	@echo "Termine."## CREATION ARCHIVE#ARCHIVE_FILES = *archive: clean	@echo "Creation de l'archive $(NOM_PROJET)$(shell date '+%y%m%d.tar.gz')..."	@REP=`basename "$$PWD"`; cd .. && tar zcf $(NOM_PROJET)$(shell date '+%y%m%d.tar.gz') $(addprefix "$$REP"/,$(ARCHIVE_FILES))	@echo "Termine."# DEPENDANCESstr.o: str.c str.hjson_parser.o: json_parser.c json.h str.h constante.hjson_encoder.o: json_encoder.c json.h str.h constante.hjson_array.o: json_array.c json.h str.h constante.herror.o: error.c str.h error.harraylist.o: arraylist.c str.h arraylist.h constante.h server.h json.hserver_tcp.o: server_tcp.c error.h server.h constante.hserver_udp.o: server_udp.c error.h server.h constante.hbomberstudent_server.o: bomberstudent_server.c arraylist.h constante.h \ server.h json.h str.h bomberstudent_server.h client.h error.h handler.h \ game.h player.hclient.o: client.c client.h constante.h server.hfile.o: file.c error.h str.h file.h constante.hhandler.o: handler.c error.h bomberstudent_server.h constante.h server.h \ json.h str.h client.h player.h handler.h game.hplayer.o: player.c player.h constante.h client.h server.h json.h str.hgame.o: game.c error.h str.h file.h constante.h game.h player.h client.h \ server.h json.h bomberstudent_server.hdelay.o: delay.c error.h delay.h constante.h game.h player.h client.h \ server.h json.h str.hobject.o: object.c object.h constante.hmain.o: main.c error.h bomberstudent_server.h constante.h server.h json.h \ str.h client.h main.h handler.h game.h player.htest.o: test.c json.h str.h constante.h arraylist.h server.h error.h \ bomberstudent_server.h client.h file.h game.h player.h
 |