2006-06-05 12:41:08 +00:00
|
|
|
CC = gcc
|
2006-06-05 18:47:09 +00:00
|
|
|
DNS = dnstun
|
|
|
|
DNSOBJS = dnstun.o tun.o dns.o
|
|
|
|
DNSD = dnstund
|
|
|
|
DNSDOBJS = dnstund.o tun.o dnsd.o
|
2006-06-05 12:41:08 +00:00
|
|
|
|
2006-06-05 12:58:50 +00:00
|
|
|
OS = `uname | tr "a-z" "A-Z"`
|
|
|
|
|
2006-06-05 12:41:08 +00:00
|
|
|
LDFLAGS =
|
2006-06-05 12:58:50 +00:00
|
|
|
CFLAGS = -c -g -Wall -D$(OS)
|
|
|
|
|
2006-06-05 18:47:09 +00:00
|
|
|
all: stateos $(DNS) $(DNSD)
|
2006-06-05 12:58:50 +00:00
|
|
|
|
|
|
|
stateos:
|
2006-06-05 13:16:24 +00:00
|
|
|
@echo OS is $(OS)
|
2006-06-05 12:41:08 +00:00
|
|
|
|
2006-06-05 18:47:09 +00:00
|
|
|
$(DNS): $(DNSOBJS)
|
2006-06-05 13:44:15 +00:00
|
|
|
@echo LD $@
|
2006-06-05 18:47:09 +00:00
|
|
|
@$(CC) $(DNSOBJS) -o $(DNS) $(LDFLAGS)
|
|
|
|
|
|
|
|
$(DNSD): $(DNSDOBJS)
|
|
|
|
@echo LD $@
|
|
|
|
@$(CC) $(DNSDOBJS) -o $(DNSD) $(LDFLAGS)
|
2006-06-05 12:41:08 +00:00
|
|
|
|
2006-06-05 13:16:24 +00:00
|
|
|
.c.o:
|
2006-06-05 13:45:20 +00:00
|
|
|
@echo CC $<
|
2006-06-05 13:16:24 +00:00
|
|
|
@$(CC) $(CFLAGS) $< -o $@
|
2006-06-05 12:41:08 +00:00
|
|
|
|
|
|
|
clean:
|
2006-06-05 13:44:15 +00:00
|
|
|
@echo "Cleaning..."
|
2006-06-05 18:47:09 +00:00
|
|
|
@rm -f $(DNS) $(DNSD) *~ *.o *.core
|
2006-06-05 12:41:08 +00:00
|
|
|
|