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