1
0
mirror of https://github.com/yarrick/iodine.git synced 2024-11-22 21:16:07 +03:00
iodine/Makefile
2006-08-25 16:18:14 +00:00

44 lines
830 B
Makefile

CC = gcc
CLIENT = iodine
CLIENTOBJS = iodine.o tun.o dns.o read.o encoding.o
SERVER = iodined
SERVEROBJS = iodined.o tun.o dns.o read.o encoding.o
TESTSUITE = tester
TESTOBJS = test.o dns.o read.o encoding.o
OS = `uname | tr "a-z" "A-Z"`
LDFLAGS = -lz
CFLAGS = -c -g -Wall -D$(OS)
all: stateos $(CLIENT) $(SERVER) $(TESTSUITE)
test: $(TESTSUITE)
@./$(TESTSUITE)
stateos:
@echo OS is $(OS)
$(CLIENT): $(CLIENTOBJS)
@echo LD $@
@$(CC) $(CLIENTOBJS) -o $(CLIENT) $(LDFLAGS)
$(SERVER): $(SERVEROBJS)
@echo LD $@
@$(CC) $(SERVEROBJS) -o $(SERVER) $(LDFLAGS)
$(TESTSUITE): $(TESTOBJS)
@echo LD $@
@$(CC) $(TESTOBJS) -o $(TESTSUITE) $(LDFLAGS)
@echo Running tests...
@./$(TESTSUITE)
.c.o:
@echo CC $<
@$(CC) $(CFLAGS) $< -o $@
clean:
@echo "Cleaning..."
@rm -f $(CLIENT) $(SERVER) $(TESTSUITE) *~ *.o *.core