Makefile 411 Bytes
Newer Older
powelld's avatar
powelld committed
1 2 3 4 5 6 7
CFLAGS=-g -I../../include
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)