2006-06-05 16:41:08 +04:00
|
|
|
CC = gcc
|
2006-11-09 22:08:28 +03:00
|
|
|
CLIENT = ../bin/iodine
|
2006-08-13 03:24:59 +04:00
|
|
|
CLIENTOBJS = iodine.o tun.o dns.o read.o encoding.o
|
2006-11-09 22:08:28 +03:00
|
|
|
SERVER = ../bin/iodined
|
2006-08-13 03:24:59 +04:00
|
|
|
SERVEROBJS = iodined.o tun.o dns.o read.o encoding.o
|
2006-06-05 16:41:08 +04:00
|
|
|
|
2006-06-05 16:58:50 +04:00
|
|
|
OS = `uname | tr "a-z" "A-Z"`
|
|
|
|
|
2006-06-06 21:59:24 +04:00
|
|
|
LDFLAGS = -lz
|
2006-06-05 16:58:50 +04:00
|
|
|
CFLAGS = -c -g -Wall -D$(OS)
|
|
|
|
|
2006-08-25 01:02:52 +04:00
|
|
|
all: stateos $(CLIENT) $(SERVER) $(TESTSUITE)
|
|
|
|
|
2006-06-05 16:58:50 +04:00
|
|
|
stateos:
|
2006-06-05 17:16:24 +04:00
|
|
|
@echo OS is $(OS)
|
2006-06-05 16:41:08 +04:00
|
|
|
|
2006-06-11 16:41:11 +04:00
|
|
|
$(CLIENT): $(CLIENTOBJS)
|
2006-06-05 17:44:15 +04:00
|
|
|
@echo LD $@
|
2006-11-09 22:08:28 +03:00
|
|
|
@mkdir -p ../bin
|
2006-06-11 16:41:11 +04:00
|
|
|
@$(CC) $(CLIENTOBJS) -o $(CLIENT) $(LDFLAGS)
|
2006-06-05 22:47:09 +04:00
|
|
|
|
2006-06-11 16:41:11 +04:00
|
|
|
$(SERVER): $(SERVEROBJS)
|
2006-06-05 22:47:09 +04:00
|
|
|
@echo LD $@
|
2006-11-09 22:08:28 +03:00
|
|
|
@mkdir -p ../bin
|
2006-06-11 16:41:11 +04:00
|
|
|
@$(CC) $(SERVEROBJS) -o $(SERVER) $(LDFLAGS)
|
2006-06-05 16:41:08 +04:00
|
|
|
|
2006-06-05 17:16:24 +04:00
|
|
|
.c.o:
|
2006-06-05 17:45:20 +04:00
|
|
|
@echo CC $<
|
2006-06-05 17:16:24 +04:00
|
|
|
@$(CC) $(CFLAGS) $< -o $@
|
2006-06-05 16:41:08 +04:00
|
|
|
|
|
|
|
clean:
|
2006-06-05 17:44:15 +04:00
|
|
|
@echo "Cleaning..."
|
2006-08-25 20:18:14 +04:00
|
|
|
@rm -f $(CLIENT) $(SERVER) $(TESTSUITE) *~ *.o *.core
|
2006-06-05 16:41:08 +04:00
|
|
|
|