All pastes #386825 Raw Edit

Shyne owns Raistlin

public text v1 · immutable
·published 2007-03-08 22:18 UTC
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