1
0
Fork 0
mirror of https://github.com/yarrick/iodine.git synced 2025-04-10 04:21:01 +00:00

Added debug / default build options (make debug)

This commit is contained in:
frekky 2015-09-28 12:24:15 +08:00
parent 0449c465e7
commit c48822dfbe
2 changed files with 14 additions and 2 deletions

View file

@ -18,6 +18,9 @@ TARGETOS = `uname`
all: all:
@(cd src; $(MAKE) TARGETOS=$(TARGETOS) all) @(cd src; $(MAKE) TARGETOS=$(TARGETOS) all)
debug:
@(cd src; $(MAKE) TARGETOS=$(TARGETOS) debug)
install: all install: all
$(MKDIR) $(MKDIR_FLAGS) $(DESTDIR)$(sbindir) $(MKDIR) $(MKDIR_FLAGS) $(DESTDIR)$(sbindir)

View file

@ -10,9 +10,18 @@ HEAD_COMMIT = `git rev-parse --short HEAD`
LIBPATH = -L. LIBPATH = -L.
LDFLAGS += -lz `sh osflags $(TARGETOS) link` $(LIBPATH) LDFLAGS += -lz `sh osflags $(TARGETOS) link` $(LIBPATH)
CFLAGS += -std=c99 -c -g -Wall -D$(OS) -pedantic `sh osflags $(TARGETOS) cflags` -DGITREVISION=\"$(HEAD_COMMIT)\" CFLAGS += -std=c99 -c -Wall -D$(OS) -pedantic `sh osflags $(TARGETOS) cflags` -DGITREVISION=\"$(HEAD_COMMIT)\"
all: stateos $(CLIENT) $(SERVER) CFLAGS_RELEASE = -O3 -fno-strict-aliasing
CFLAGS_DEBUG = -g -Og -DDEBUG_BUILD
all: CFLAGS += $(CFLAGS_RELEASE)
all: executables
debug: CFLAGS += $(CFLAGS_DEBUG)
debug: executables
executables: stateos $(CLIENT) $(SERVER)
stateos: stateos:
@echo OS is $(OS), arch is $(ARCH) @echo OS is $(OS), arch is $(ARCH)