Makefile 422 Bytes
Newer Older
CFLAGS=-g -std=gnu11 -I../../include
powelld's avatar
powelld committed
LIBS=-lssl -lcrypto -lpthread -ldl
LDFLAGS=-L../..
TARGETS=client server middlebox

all: $(TARGETS)

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

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

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

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

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