Makefile
700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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