#*****************************************
#
# Cedric Pradalier 2001
# mail : http://cedric.pradalier.free.fr/mail.html
#
#****************************************/
DESTDIR=$(HOME)
DESTINC=$(DESTDIR)/include
DESTLIB=$(DESTDIR)/lib
LIB=-lX11
CC=gcc -c $(FLAGS)
#Si les fonction de la lib X11 (X...) ne sont pas trouves,
#il suffit souvent de trouver le repertoire qui contient libX11.a
#puis de modifier le flag suivant (et le décommenter)
#LDFLAG=-L/usr/X11R6/lib
LD=gcc $(LDFLAG)
FLAGS=-g
all : libGraph.a
install : all
cp libX+.a $(DESTLIB)
cp libX+.h $(DESTINC)
libGraph.o: libGraph.c libGraph.h
$(CC) libGraph.c -o libGraph.o
libGraph.a: libGraph.o
rm -f libGraph.a
ar r libGraph.a libGraph.o
test.o: test.c libGraph.h
$(CC) test.c -o test.o
testc: test.o libGraph.a
$(LD) test.o -L. -lGraph $(LIB) -o testc
test : testc
./testc
clean:
rm -f *.o
veryclean : clean
rm -f testc
rm -f libGraph.a