#-------------------------------------------------------------------% # # LIBNAZGUL : Library # #-------------------------------------------------------------------% # # IUP GMI 2, Module de Système. 2003-2004. # Cours de J-M. Rifflet. # #-------------------------------------------------------------------% # # Projet de : # Glenn ROLLAND, # Sebastian SCHAWOHL, # Rivka ZANA # # pour plus de détails au sujet du projet, voir le # fichier README # #-------------------------------------------------------------------% OS=$(shell uname -s) CC=gcc CFLAGS=-Wall -O2 -ggdb #-O2 -ggdb INCLUDES=-I /usr/include/ -I ../src/ LIBINC=-L /usr/lib -L ../src BASELIBS=-lnazgul LIBS=$(BASELIBS) DEFS= ifeq "HP-UX" "${OS}" DEFS=-D_NZG_HPUX LIBS=$(BASELIBS) -lpthread -lrt endif ifeq "SunOS" "${OS}" DEFS=-D_NZG_SUNOS LIBS=$(BASELIBS) -lrt endif ifeq "Linux" "${OS}" DEFS=-D_NZG_LINUX LIBS=$(BASELIBS) -lrt -lpthread endif PRJNAME=Libnazgul GDATE := $(shell date +"-%Y-%m-%d_r%H") GFILENAME := ../$(PRJNAME)$(GDATE).tar.bz2 LOCALDIR = $(shell pwd) CFILES := $(shell ls *.c) #OFILES := $(patsubst %.c,%.o,$(CFILES)) FILES := $(patsubst %.c,%,$(CFILES)) all: build build : $(FILES) clean: @echo -e "Cleaning..." @rm -f *.a @rm -f *.o @rm -f $(FILES) % : %.c $(CC) -o $* $< $(INCLUDES) $(LIBINC) $(LIBS) $(CFLAGS) $(DEFS)