2006-06-05 15:41:08 +03:00
|
|
|
CC = gcc
|
2006-06-05 21:47:09 +03:00
|
|
|
DNS = dnstun
|
2006-06-08 21:57:57 +03:00
|
|
|
DNSOBJS = dnstun.o tun.o dns.o read.o
|
2006-06-05 21:47:09 +03:00
|
|
|
DNSD = dnstund
|
2006-06-08 21:57:57 +03:00
|
|
|
DNSDOBJS = dnstund.o tun.o dnsd.o read.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-06 20:59:24 +03:00
|
|
|
LDFLAGS = -lz
|
2006-06-05 15:58:50 +03:00
|
|
|
CFLAGS = -c -g -Wall -D$(OS)
|
|
|
|
|
2006-06-05 21:47:09 +03:00
|
|
|
all: stateos $(DNS) $(DNSD)
|
2006-06-05 15:58:50 +03:00
|
|
|
|
|
|
|
stateos:
|
2006-06-05 16:16:24 +03:00
|
|
|
@echo OS is $(OS)
|
2006-06-05 15:41:08 +03:00
|
|
|
|
2006-06-05 21:47:09 +03:00
|
|
|
$(DNS): $(DNSOBJS)
|
2006-06-05 16:44:15 +03:00
|
|
|
@echo LD $@
|
2006-06-05 21:47:09 +03:00
|
|
|
@$(CC) $(DNSOBJS) -o $(DNS) $(LDFLAGS)
|
|
|
|
|
|
|
|
$(DNSD): $(DNSDOBJS)
|
|
|
|
@echo LD $@
|
|
|
|
@$(CC) $(DNSDOBJS) -o $(DNSD) $(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..."
|
2006-06-05 21:47:09 +03:00
|
|
|
@rm -f $(DNS) $(DNSD) *~ *.o *.core
|
2006-06-05 15:41:08 +03:00
|
|
|
|