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