2006-06-05 16:41:08 +04:00
|
|
|
CC = gcc
|
|
|
|
OUT = dnstun
|
|
|
|
OBJS = dnstun.o tun.o
|
|
|
|
|
2006-06-05 16:58:50 +04:00
|
|
|
OS = `uname | tr "a-z" "A-Z"`
|
|
|
|
|
2006-06-05 16:41:08 +04:00
|
|
|
LDFLAGS =
|
2006-06-05 16:58:50 +04:00
|
|
|
CFLAGS = -c -g -Wall -D$(OS)
|
|
|
|
|
|
|
|
all: stateos $(OUT)
|
|
|
|
|
|
|
|
stateos:
|
2006-06-05 17:16:24 +04:00
|
|
|
@echo OS is $(OS)
|
2006-06-05 16:41:08 +04:00
|
|
|
|
|
|
|
$(OUT): $(OBJS)
|
2006-06-05 17:16:24 +04:00
|
|
|
@$(CC) $(OBJS) -o $(OUT) $(LDFLAGS)
|
2006-06-05 16:41:08 +04:00
|
|
|
|
2006-06-05 17:16:24 +04:00
|
|
|
.c.o:
|
|
|
|
@echo Compile $@
|
|
|
|
@$(CC) $(CFLAGS) $< -o $@
|
2006-06-05 16:41:08 +04:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(OUT)
|
|
|
|
rm -f *~
|
|
|
|
rm -f *.o
|
|
|
|
rm -f *.core
|
|
|
|
|
|
|
|
run: $(OUT)
|
|
|
|
./$(OUT)
|