Renamed files, updated header comments
[transsip-mirror.git] / src / definitions.mk
blobbce814d9c63226c90ddbbd3cc787c0197c52cc48
2 # Makefile definitions for netyack
3 # Author: Daniel Borkmann
6 # For mem debugging add -D_DEBUG_
7 LD_NORM = echo "LD $(target)"; \
8 gcc -pie -z relo
9 CC_NORM = echo "CC $<"; \
10 gcc
11 CC_DEBUG = echo "DC $<"; \
12 gcc
13 A2X_NORM = echo "A2X $<"; \
14 a2x
15 FL_NORM = echo "FL $(flex-obj)"; \
16 flex
17 BI_NORM = echo "BI $(bison-obj)"; \
18 bison
20 MAKEFLAGS += --no-print-directory --silent
22 BINDIR = usr/sbin
23 ETCDIR = etc
25 define eq
26 $(if $(1:$(2)=),,$(if $(2:$(1)=),,T))
27 endef
29 FL = $(FL_NORM)
30 BI = $(BI_NORM) -d
32 ifneq ($(or $(call eq,$(MAKECMDGOALS),"all"), $(call eq,$(MAKECMDGOALS),"")),)
33 LD = $(LD_NORM) -o
34 CC = $(CC_NORM) -c
35 CFLAGS = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common \
36 -fno-delete-null-pointer-checks -std=gnu99 \
37 -fstack-protector -D_FORTIFY_SOURCE=2 -fPIE \
38 -fno-strict-overflow -D_REENTRANT -pedantic
39 CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
40 -Werror-implicit-function-declaration -Wno-format-security \
41 -Wcomments -Wendif-labels -Wno-long-long -Wuninitialized \
42 -Wstrict-overflow
43 endif
45 .PHONY: all