diff options
author | Daniel De Graaf <danieldg@inspircd.org> | 2010-09-28 11:16:34 -0400 |
---|---|---|
committer | Daniel De Graaf <danieldg@inspircd.org> | 2010-09-28 11:16:34 -0400 |
commit | 3dc56e3425c0cc41caee9ac33c60204cb8cbf8c9 (patch) | |
tree | 1539e2c932d83fe6dcba61ea6a44547c89df5a64 /make | |
parent | 2d0e736f335391b21b63461953c397b889daf7ec (diff) |
Work around old GNU make's inability to use "else if"
Diffstat (limited to 'make')
-rw-r--r-- | make/template/main.mk | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/make/template/main.mk b/make/template/main.mk index e92006b3e..9ae142cb5 100644 --- a/make/template/main.mk +++ b/make/template/main.mk @@ -37,34 +37,42 @@ INSTMODE_LIB = 0644 @IFEQ $(SYSTEM) linux LDLIBS += -ldl -lrt -@ELSIFEQ $(SYSTEM) solaris +@ENDIF +@IFEQ $(SYSTEM) solaris LDLIBS += -lsocket -lnsl -lrt -lresolv -@ELSIFEQ $(SYSTEM) sunos +@ENDIF +@IFEQ $(SYSTEM) sunos LDLIBS += -lsocket -lnsl -lrt -lresolv -@ELSIFEQ $(SYSTEM) darwin +@ENDIF +@IFEQ $(SYSTEM) darwin CXXFLAGS += -DDARWIN -frtti LDLIBS += -ldl CORELDFLAGS = -dynamic -bind_at_load -L. $(LDFLAGS) PICLDFLAGS = -fPIC -shared -bundle -twolevel_namespace -undefined dynamic_lookup $(LDFLAGS) -@ELSIFEQ $(SYSTEM) interix +@ENDIF +@IFEQ $(SYSTEM) interix CXXFLAGS += -D_ALL_SOURCE -I/usr/local/include -@ENDIF +@ENDIF @IFNDEF D D=0 @ENDIF +DBGOK=0 @IFEQ $(D) 0 CXXFLAGS += -O2 -g1 HEADER = std-header -@ELSIFEQ $(D) 1 + DBGOK=1 +@ENDIF +@IFEQ $(D) 1 CXXFLAGS += -O0 -g3 -Werror HEADER = debug-header -@ELSIFEQ $(D) 2 + DBGOK=1 +@ENDIF +@IFEQ $(D) 2 CXXFLAGS += -O2 -g3 HEADER = debug-header -@ELSE - HEADER = unknown-debug-level + DBGOK=1 @ENDIF FOOTER = finishmessage @@ -109,6 +117,10 @@ TARGET = all TARGET = $(T) @ENDIF +@IFEQ $(DBGOK) 0 + HEADER = unknown-debug-level +@ENDIF + all: $(FOOTER) target: $(HEADER) |