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:
parent
0449c465e7
commit
c48822dfbe
2 changed files with 14 additions and 2 deletions
3
Makefile
3
Makefile
|
@ -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)
|
||||||
|
|
13
src/Makefile
13
src/Makefile
|
@ -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)
|
||||||
|
|
Loading…
Add table
Reference in a new issue