summaryrefslogtreecommitdiff
path: root/make-linux.mk
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-06-08 11:21:01 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-06-08 11:21:01 -0700
commit0ca764968ae0c09510d055390a3cec252caecfae (patch)
treea7e7b9396f991657d1d5dff8d38498df879f527e /make-linux.mk
parent62b64d39ab30b91d99b4b9aef8ef2990f86fdff6 (diff)
downloadinfinitytier-0ca764968ae0c09510d055390a3cec252caecfae.tar.gz
infinitytier-0ca764968ae0c09510d055390a3cec252caecfae.zip
Remove warnings, more Debian stuff, remove obsolete ui/ stuff.
Diffstat (limited to 'make-linux.mk')
-rw-r--r--make-linux.mk15
1 files changed, 9 insertions, 6 deletions
diff --git a/make-linux.mk b/make-linux.mk
index 267673e1..994c6c03 100644
--- a/make-linux.mk
+++ b/make-linux.mk
@@ -30,7 +30,7 @@ endif
#UNAME_M=$(shell $(CC) -dumpmachine | cut -d '-' -f 1)
INCLUDES?=
-DEFS?=
+DEFS?=-D_FORTIFY_SOURCE=2
LDLIBS?=
DESTDIR?=
@@ -89,17 +89,17 @@ ifeq ($(ZT_DEBUG),1)
DEFS+=-DZT_TRACE
CFLAGS+=-Wall -g -pthread $(INCLUDES) $(DEFS)
CXXFLAGS+=-Wall -g -pthread $(INCLUDES) $(DEFS)
- LDFLAGS=-ldl
+ LDFLAGS=
STRIP?=echo
# The following line enables optimization for the crypto code, since
# C25519 in particular is almost UNUSABLE in -O0 even on a 3ghz box!
ext/lz4/lz4.o node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CFLAGS = -Wall -O2 -g -pthread $(INCLUDES) $(DEFS)
else
- CFLAGS?=-O3 -fstack-protector
+ CFLAGS?=-O3 -fstack-protector-strong
CFLAGS+=-Wall -fPIE -fvisibility=hidden -pthread $(INCLUDES) -DNDEBUG $(DEFS)
- CXXFLAGS?=-O3 -fstack-protector
+ CXXFLAGS?=-O3 -fstack-protector-strong
CXXFLAGS+=-Wall -Wreorder -fPIE -fvisibility=hidden -fno-rtti -pthread $(INCLUDES) -DNDEBUG $(DEFS)
- LDFLAGS=-ldl -pie -Wl,-z,relro,-z,now
+ LDFLAGS=-pie -Wl,-z,relro,-z,now
STRIP?=strip
STRIP+=--strip-all
endif
@@ -142,7 +142,7 @@ manpages: FORCE
cd doc ; ./build.sh
clean: FORCE
- rm -rf *.so *.o netcon/*.a node/*.o controller/*.o osdep/*.o service/*.o ext/http-parser/*.o ext/lz4/*.o ext/json-parser/*.o ext/miniupnpc/*.o ext/libnatpmp/*.o $(OBJS) zerotier-one zerotier-idtool zerotier-cli zerotier-selftest zerotier-netcon-service build-* ZeroTierOneInstaller-* *.deb *.rpm .depend netcon/.depend doc/*.1 doc/*.2 doc/*.8
+ rm -rf *.so *.o netcon/*.a node/*.o controller/*.o osdep/*.o service/*.o ext/http-parser/*.o ext/lz4/*.o ext/json-parser/*.o ext/miniupnpc/*.o ext/libnatpmp/*.o $(OBJS) zerotier-one zerotier-idtool zerotier-cli zerotier-selftest zerotier-netcon-service build-* ZeroTierOneInstaller-* *.deb *.rpm .depend netcon/.depend doc/*.1 doc/*.2 doc/*.8 debian/zerotier-one* debian/files
find netcon -type f \( -name '*.o' -o -name '*.so' -o -name '*.1.0' -o -name 'zerotier-one' -o -name 'zerotier-cli' -o -name 'zerotier-netcon-service' \) -delete
find netcon/docker-test -name "zerotier-intercept" -type f -delete
@@ -193,4 +193,7 @@ uninstall: FORCE
rm -f $(DESTDIR)/usr/share/man/man1/zerotier-idtool.1.gz
rm -f $(DESTDIR)/usr/share/man/man1/zerotier-cli.1.gz
+debian: distclean
+ debuild -I -i -us -uc
+
FORCE: