diff --git a/cgame/Makefile b/cgame/Makefile index d0da55c..46521f6 100644 --- a/cgame/Makefile +++ b/cgame/Makefile @@ -23,6 +23,13 @@ else EXT=so endif +# warning level +ifeq ($(DEBUG), 1) +WL=-Wall +else +WL=-Wall -Wno-unused-but-set-variable +endif + # cgame objects OBJ = \ fx_transporter.o \ @@ -114,9 +121,9 @@ LUAOBJ = \ # do cc for shared library ifeq ($(DEBUG), 1) -DO_SOCC = $(CC) $(SOCFLAGS) -Wall -g3 $(DEFINES) -o $@ -c $< +DO_SOCC = $(CC) $(SOCFLAGS) $(WL) -g3 $(DEFINES) -o $@ -c $< else -DO_SOCC = $(CC) $(SOCFLAGS) -Wall -Wno-unused-but-set-variable $(DEFINES) -o $@ -c $< +DO_SOCC = $(CC) $(SOCFLAGS) $(WL) $(DEFINES) -o $@ -c $< endif # do cc for lua ifeq ($(DEBUG), 1) @@ -215,9 +222,9 @@ lzio.o: ../game/lzio.c; $(DO_LUACC) build_so: $(OBJDEP) $(OBJ) $(SOOBJ) $(LUAOBJ) ifeq ($(PLATFORM), mingw32) - $(CC) -shared -Wl,--export-all-symbols,-soname,cgame$(ARCH).$(EXT) -o cgame$(ARCH).$(EXT) $(OBJ) $(OBJDEP) $(SOOBJ) $(LUAOBJ) + $(CC) -shared -Wl,--export-all-symbols,-soname,cgame$(ARCH).$(EXT) -o cgame$(ARCH).$(EXT) $(OBJ) $(OBJDEP) $(SOOBJ) $(LUAOBJ) -lm else - $(CC) -shared -Wl,--export-dynamic,-soname,cgame$(ARCH).$(EXT) -o cgame$(ARCH).$(EXT) $(OBJ) $(OBJDEP) $(SOOBJ) $(LUAOBJ) + $(CC) -shared -Wl,--export-dynamic,-soname,cgame$(ARCH).$(EXT) -o cgame$(ARCH).$(EXT) $(OBJ) $(OBJDEP) $(SOOBJ) $(LUAOBJ) -lm -lpthread endif clean: diff --git a/game/Makefile b/game/Makefile index 3eca280..ca6f1a8 100644 --- a/game/Makefile +++ b/game/Makefile @@ -254,7 +254,7 @@ build_so: $(OBJ) $(SOOBJ) $(LUAOBJ) ifeq ($(PLATFORM), mingw32) $(CC) -shared -Wl,--export-all-symbols,-soname,qqgame$(ARCH).$(EXT) -o qagame$(ARCH).$(EXT) $(OBJ) $(SOOBJ) $(LUAOBJ) -lm else - $(CC) -shared -Wl,--export-dynamic,-soname,qagame$(ARCH).$(EXT) -o qagame$(ARCH).$(EXT) $(OBJ) $(SOOBJ) $(LUAOBJ) -lm + $(CC) -shared -Wl,--export-dynamic,-soname,qagame$(ARCH).$(EXT) -o qagame$(ARCH).$(EXT) $(OBJ) $(SOOBJ) $(LUAOBJ) -lm -lpthread endif clean: diff --git a/ui/Makefile b/ui/Makefile index 8380720..245aae3 100644 --- a/ui/Makefile +++ b/ui/Makefile @@ -25,6 +25,13 @@ else EXT=so endif +# warning level +ifeq ($(DEBUG), 1) +WL=-Wall +else +WL=-Wall -Wno-unused-but-set-variable +endif + # ui objects OBJ = \ ui_turbolift.o \ @@ -80,9 +87,9 @@ SOOBJ = \ # do cc for shared libraries ifeq ($(DEBUG), 1) -DO_SOCC = $(CC) $(SOCFLAGS) -Wall -g3 $(DEFINES) -o $@ -c $< +DO_SOCC = $(CC) $(SOCFLAGS) $(WL) -g3 $(DEFINES) -o $@ -c $< else -DO_SOCC = $(CC) $(SOCFLAGS) -Wall -Wno-unused-but-set-variable $(DEFINES) -o $@ -c $< +DO_SOCC = $(CC) $(SOCFLAGS) $(WL) $(DEFINES) -o $@ -c $< endif build_so: DO_CC=$(DO_SOCC)