2006-06-05 16:41:08 +04:00
|
|
|
CC = gcc
|
|
|
|
OUT = dnstun
|
2006-06-05 17:38:10 +04:00
|
|
|
OBJS = dnstun.o tun.o dns.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-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:44:15 +04:00
|
|
|
@echo LD $@
|
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:
|
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..."
|
|
|
|
@rm -f $(OUT) *~ *.o *.core
|
2006-06-05 16:41:08 +04:00
|
|
|
|
|
|
|
run: $(OUT)
|
|
|
|
./$(OUT)
|