rendered paste body/Makefile
all:
make -C lib all
make -C src all
clean:
make -C lib clean
make -C src clean
---
/lib/Makefile
# Makefile for compiling library
CFLAGS = -Wall -Werror -g
INCLUDE = -I../include
all: firewall.o
firewall.o: firewall.c ../include/server.h
$(CC) $(CFLAGS) $(INCLUDE) -fPIC -c firewall.c
clean:
rm -f firewall.o
---
/src/Makefile
CFLAGS = -Wall -Werror -g
INCLUDE = -I../include
LIBDIR = -L../lib
#LIBS = -ltrees
all: server add check
server: server.o
$(CC) $(CFLAGS) $(INCLUDE) $(LIBDIR) -o server server.o ../lib/firewall.o
server.o:
$(CC) $(CFLAGS) $(INCLUDE) $(LIBDIR) -c server.c
add:
$(CC) $(CFLAGS) $(INCLUDE) -o add add.c
check:
$(CC) $(CFLAGS) $(INCLUDE) -o check check.c
clean:
rm -f add check server *.o