Makefile 422 Bytes
Newer Older
canterburym's avatar
canterburym committed
1
CFLAGS=-g -std=gnu11 -I../../include
powelld's avatar
powelld committed
2
3
4
5
6
7
LIBS=-lssl -lcrypto -lpthread -ldl
LDFLAGS=-L../..
TARGETS=client server middlebox

all: $(TARGETS)

powelld's avatar
powelld committed
8
client: client.o common.o cJSON.o
powelld's avatar
powelld committed
9
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
powelld's avatar
powelld committed
10
11

server: server.o common.o cJSON.o
powelld's avatar
powelld committed
12
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
powelld's avatar
powelld committed
13
14

middlebox: middlebox.o common.o cJSON.o
powelld's avatar
powelld committed
15
16
17
18
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)

%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $<
powelld's avatar
powelld committed
19

powelld's avatar
powelld committed
20
clean:
powelld's avatar
powelld committed
21
	rm -f *.o $(TARGETS)