Makefile 700 Bytes

CC=gcc
CFLAGS=-W -Wall -Wextra -g
CLIBS=ar -rcs
LIB=libnet.a libthrd.a
LDIR=../libs/
LIBS=$(LDIR)libnet.a $(LDIR)libthrd.a
IDIR=../includes/
LDFLAGS=-lpthread -lpcap



all: sonde serverTCP

serverTCP: serverTCP.c
	cd ../Threads/ && make
	cd ../Network/ && make
	$(CC) -o $@ $< -I$(IDIR) -L$(LDIR) $(LDIR)libthrd.a $(LDIR)libnet.a $(CFLAGS) $(LDFLAGS) 
	rm -f *.o


sonde: sonde.c
	cd ../Threads/ && make
	cd ../Network/ && make
	$(CC) -o $@ $< -I$(IDIR) $(LDIR)libnet.a $(LDIR)libthrd.a $(CFLAGS) $(LDFLAGS) 
	rm -f *.o

#
# La cible de nettoyage
#

clean: 
	cd ../Threads/ && make clean
	cd ../Network/ && make clean
	rm -f *.o sonde serverTCP


#	cd ../Threads/ && make
#	cd ../Network/ && make