source: Makefile @ 91bca7

Revision 91bca7, 817 bytes checked in by Erik Ekman <yarrick@…>, 12 years ago (diff)

Always do tests

  • Property mode set to 100644
Line 
1CC = gcc
2CLIENT = iodine
3CLIENTOBJS = iodine.o tun.o dns.o read.o encoding.o
4SERVER = iodined
5SERVEROBJS = iodined.o tun.o dns.o read.o encoding.o
6TESTSUITE = tester
7TESTOBJS = test.o dns.o read.o encoding.o
8
9OS = `uname | tr "a-z" "A-Z"`
10
11LDFLAGS =  -lz
12CFLAGS = -c -g -Wall -D$(OS)
13
14all: stateos $(CLIENT) $(SERVER) $(TESTSUITE)
15
16test:   $(TESTSUITE)
17        @./$(TESTSUITE)
18
19stateos:
20        @echo OS is $(OS)
21
22$(CLIENT): $(CLIENTOBJS)
23        @echo LD $@
24        @$(CC) $(CLIENTOBJS) -o $(CLIENT) $(LDFLAGS)
25
26$(SERVER): $(SERVEROBJS)
27        @echo LD $@
28        @$(CC) $(SERVEROBJS) -o $(SERVER) $(LDFLAGS)
29
30$(TESTSUITE): $(TESTOBJS)
31        @echo LD $@
32        @$(CC) $(TESTOBJS) -o $(TESTSUITE) $(LDFLAGS)
33        @echo Running tests...
34        @./$(TESTSUITE)
35
36.c.o:
37        @echo CC $<
38        @$(CC) $(CFLAGS) $< -o $@
39
40clean:
41        @echo "Cleaning..."
42        @rm -f $(CLIENT) $(SERVER) *~ *.o *.core
43
Note: See TracBrowser for help on using the repository browser.