2008-07-12 15:36:39 +04:00
|
|
|
COMMONOBJS = tun.o dns.o read.o encoding.o login.o base32.o base64.o md5.o common.o
|
2007-06-09 21:48:28 +04:00
|
|
|
CLIENTOBJS = iodine.o
|
2006-11-09 22:08:28 +03:00
|
|
|
CLIENT = ../bin/iodine
|
2008-08-08 01:18:15 +04:00
|
|
|
SERVEROBJS = iodined.o user.o fw_query.o
|
2006-11-09 22:08:28 +03:00
|
|
|
SERVER = ../bin/iodined
|
2006-06-05 16:41:08 +04:00
|
|
|
|
2009-01-25 19:28:17 +03:00
|
|
|
OS = `echo $(TARGETOS) | tr "a-z" "A-Z"`
|
2007-01-28 07:17:33 +03:00
|
|
|
ARCH = `uname -m`
|
2006-06-05 16:58:50 +04:00
|
|
|
|
2009-01-25 01:19:11 +03:00
|
|
|
LIBPATH = -L.
|
2009-08-15 23:17:02 +04:00
|
|
|
LDFLAGS += -lz `sh osflags $(TARGETOS) link` $(LIBPATH)
|
|
|
|
CFLAGS += -c -g -Wall -D$(OS) -pedantic `sh osflags $(TARGETOS) cflags`
|
2006-06-05 16:58:50 +04:00
|
|
|
|
2007-12-02 00:23:59 +03:00
|
|
|
all: stateos $(CLIENT) $(SERVER)
|
2006-08-25 01:02:52 +04:00
|
|
|
|
2006-06-05 16:58:50 +04:00
|
|
|
stateos:
|
2007-01-28 07:17:33 +03:00
|
|
|
@echo OS is $(OS), arch is $(ARCH)
|
2006-06-05 16:41:08 +04:00
|
|
|
|
2007-06-09 21:48:28 +04:00
|
|
|
$(CLIENT): $(COMMONOBJS) $(CLIENTOBJS)
|
2006-06-05 17:44:15 +04:00
|
|
|
@echo LD $@
|
2006-11-09 22:08:28 +03:00
|
|
|
@mkdir -p ../bin
|
2007-06-09 21:48:28 +04:00
|
|
|
@$(CC) $(COMMONOBJS) $(CLIENTOBJS) -o $(CLIENT) $(LDFLAGS)
|
2006-06-05 22:47:09 +04:00
|
|
|
|
2007-06-09 21:48:28 +04:00
|
|
|
$(SERVER): $(COMMONOBJS) $(SERVEROBJS)
|
2006-06-05 22:47:09 +04:00
|
|
|
@echo LD $@
|
2006-11-09 22:08:28 +03:00
|
|
|
@mkdir -p ../bin
|
2007-06-09 21:48:28 +04:00
|
|
|
@$(CC) $(COMMONOBJS) $(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-11-18 16:37:37 +03:00
|
|
|
@echo "Cleaning src/"
|
2009-01-25 01:19:11 +03:00
|
|
|
@rm -f $(CLIENT){,.exe} $(SERVER){,.exe} *~ *.o *.core
|
2006-06-05 16:41:08 +04:00
|
|
|
|