2 # Makefile for curvetun
3 # Author: Daniel Borkmann
6 include ..
/definitions.mk
9 CFLAGS
+= -DTARGETNAME
="\"curvetun\""
12 core-objs
= curvetun.o
13 lib-objs
= xmalloc.o \
28 all: clean gen-version build doc
33 @cd ..
&& cat ..
/VERSION | xargs .
/gen_build_info.pl
35 build
: $(lib-objs
) $(core-objs
)
36 @
$(LD
) $(target
) $(core-objs
) $(lib-objs
) $(LIBS
)
42 @cd ..
/..
/Documentation
&& make
clean
43 @cd ..
/..
/Documentation
&& make curvetun
44 @cp ..
/..
/Documentation
/man
/* .
45 @cp ..
/..
/Documentation
/pdf
/* .
46 @cp ..
/..
/Documentation
/html
/* .
49 @
$(CC
) $(CFLAGS
) $(INCLUDE
) $<
52 @
rm *.o
*~
$(target
) ..
/version.h
*.gz
*.pdf
*.html
*.8 *.css
> \
53 /dev
/null
2>&1 || true
56 @
install -D
$(target
) $(DESTDIR
)/$(BINDIR
)/$(target
)
57 @
install -D
$(target
).8.gz
$(DESTDIR
)/usr
/share
/man
/man8
/$(target
).8.gz
60 @
rm $(DESTDIR
)/$(BINDIR
)/$(target
) || true
61 @
rm $(DESTDIR
)/usr
/share
/man
/man8
/$(target
).8.gz || true
64 @echo
'Cleaning targets:'
65 @echo
' clean - Remove generated files'
66 @echo
'Building targets:'
67 @echo
' all - Build curvetun (default)'
68 @echo
' debug - Build curvetun for debugging _only_'
69 @echo
' deploy - Build curvetun for productive use'
70 @echo
'Setup targets:'
71 @echo
' install - Install curvetun'
72 @echo
' uninstall - Uninstall curvetun'
73 @echo
'Other targets:'
74 @echo
' help - Print this help'