[Change] Build system improvements.

[Change] Lowered debug level from -g3 to -g to reduce size.
This commit is contained in:
Allanis 2014-03-08 00:10:54 +00:00
parent 5de9171093
commit 26c1fda143

View File

@ -40,7 +40,7 @@ endif
ifdef DEBUG
CFLAGS += -W -Wall -Wextra -Wunused -Wshadow -Wpointer-arith -Wmissing-prototypes \
-Winline -Wcast-align -Wmissing-declarations -fstack-protector \
-fstack-protector-all -g3 -DDEBUG -DLUA_USE_APICHECK -std=c99
-fstack-protector-all -g -DDEBUG -DLUA_USE_APICHECK -std=c99
ifdef DEBUG_PARANOID
CFLAGS += -DDEBUG_PARANOID
@ -91,7 +91,7 @@ DATA := ldata
DATAFILES := $(DATA_AI) $(DATA_GFX) $(DATA_XML) $(DATA_SND) $(DATA_MISN)
# TARGETS.
.PHONY: all help lua utils docs clean purge
.PHONY: all help lua utils docs clean distclean
%.o: %.c %.h
@$(CC) -c $(CFLAGS) -o $@ $<
@ -101,16 +101,16 @@ all: utils ldata lua lephisto
help:
@echo "Possible targets are:":
@echo " lua - Makes Lua."
@echo " lephisto - Makes the Lephisto binary."
@echo " mkspr - Makes the mkspr utility."
@echo " lua - Builds Lua support."
@echo " lephisto - Builds the Lephisto binary."
@echo " mkspr - Builds the mkspr utility."
@echo " ldata - Creates the ldata file."
@echo " utils - Makes all the utilities."
@echo " utils - Builds all the utilities."
@echo " docs - Creates the doxygen documentation."
@echo " clean - Removes Lephisto's main binary and ldata file."
@echo " purge - Removes everything done."
@echo " distclean - Removes everything done."
lephisto: $(OBJS)
$(APPNAME): $(OBJS)
@$(CC) $(LDFLAGS) -o $(APPNAME) $(OBJS) ../lib/lua/liblua.a
@echo " LD $(APPNAME)"
@ -140,15 +140,17 @@ docs:
clean:
@echo " Removing ldata"
@$(RM) $(DATA)
@$(RM) $(OBJS)
@echo " Removing object files"
@$(RM) $(OBJS)
@echo " Removing main binary ($(APPNAME))"
@$(RM) $(APPNAME)
purge: clean
distclean: clean
@echo " Cleaning utilites"
@$(MAKE) -C ../utils/pack clean
@$(MAKE) -C ../utils/mkspr clean
@echo " Cleaning Lua"
@$(MAKE) -C ../lib/lua clean
@echo " Removing binaries."
@echo " Removing build tool binaries."
@$(RM) Lephisto mksprite ldata pack gmon.out VERSION