mirror of
https://github.com/yarrick/iodine.git
synced 2024-10-31 23:39:18 +02:00
33 lines
576 B
Makefile
33 lines
576 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
|
|
|
|
OS = `uname | tr "a-z" "A-Z"`
|
|
|
|
LDFLAGS = -lz
|
|
CFLAGS = -c -g -Wall -D$(OS)
|
|
|
|
all: stateos $(CLIENT) $(SERVER)
|
|
|
|
stateos:
|
|
@echo OS is $(OS)
|
|
|
|
$(CLIENT): $(CLIENTOBJS)
|
|
@echo LD $@
|
|
@$(CC) $(CLIENTOBJS) -o $(CLIENT) $(LDFLAGS)
|
|
|
|
$(SERVER): $(SERVEROBJS)
|
|
@echo LD $@
|
|
@$(CC) $(SERVEROBJS) -o $(SERVER) $(LDFLAGS)
|
|
|
|
.c.o:
|
|
@echo CC $<
|
|
@$(CC) $(CFLAGS) $< -o $@
|
|
|
|
clean:
|
|
@echo "Cleaning..."
|
|
@rm -f $(CLIENT) $(SERVER) *~ *.o *.core
|
|
|