Makefile 439 Bytes

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



all: test

test: test.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 test