X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2FMakefile;h=6885c601ac19af7726a91fa73fc1007d4b615574;hb=3da843584f5e953c68b8934c2b315a0944e880c8;hp=0c8a9acd67dd748c3aace06677213a189a977fce;hpb=438a173a61e0b6b62a5dbdda881e9c920df17165;p=rocksndiamonds.git diff --git a/src/Makefile b/src/Makefile index 0c8a9acd..6885c601 100644 --- a/src/Makefile +++ b/src/Makefile @@ -31,6 +31,7 @@ endif AR = ar RANLIB = ranlib ETAGS = etags +STRIP = strip RM = rm -f CONVERT = convert @@ -84,9 +85,9 @@ endif # $(info Using SDL version $(SDL_VERSION) [TARGET == $(TARGET)]) ifeq ($(TARGET),sdl2) # compiling for SDL2 target -SYS_CFLAGS = -DTARGET_SDL2 $(shell sdl2-config --cflags) SDL_LIBS = -lSDL2_image -lSDL2_mixer -lSDL2_net -SYS_LDFLAGS = $(SDL_LIBS) $(shell sdl2-config --libs) +SYS_CFLAGS := -DTARGET_SDL2 $(shell sdl2-config --cflags) +SYS_LDFLAGS := $(SDL_LIBS) $(shell sdl2-config --libs) -lm -lz endif @@ -109,22 +110,22 @@ DEBUG = -DDEBUG -g # PROFILING = $(PROFILING_FLAGS) # OPTIONS = $(DEBUG) -Wall # only for debugging purposes -# OPTIONS = $(DEBUG) -O3 -Wall # only for debugging purposes +# OPTIONS = $(DEBUG) -O2 -Wall # only for debugging purposes # OPTIONS = $(DEBUG) -Wall # only for debugging purposes OPTIONS = $(DEBUG) -Wall -Wstrict-prototypes -Wmissing-prototypes # OPTIONS = $(DEBUG) -Wall -ansi -pedantic # only for debugging purposes -# OPTIONS = -O3 -Wall -ansi -pedantic -# OPTIONS = -O3 -Wall -# OPTIONS = -O3 +# OPTIONS = -O2 -Wall -ansi -pedantic +# OPTIONS = -O2 -Wall +# OPTIONS = -O2 ifdef BUILD_DIST # distribution build SYS_LDFLAGS := $(shell echo $(SYS_LDFLAGS) | \ sed -e "s%-rpath,[^ ]*%-rpath,'\$$ORIGIN/lib'%") -OPTIONS = -O3 -Wall +OPTIONS = -O2 -Wall endif CFLAGS = $(OPTIONS) $(SYS_CFLAGS) $(EXTRA_CFLAGS) $(CONFIG) -LDFLAGS = $(SYS_LDFLAGS) $(EXTRA_LDFLAGS) -lm -lz +LDFLAGS = $(SYS_LDFLAGS) $(EXTRA_LDFLAGS) SRCS = main.c \ @@ -233,7 +234,7 @@ all: $(AUTOCONF) libgame_dir game_em_dir game_sp_dir game_mm_dir $(PROGNAME) gra $(PROGNAME): $(RNDLIBS) $(TIMESTAMP_FILE) $(COMMIT_HASH_FILE) $(OBJS) $(ICON) $(CC) $(PROFILING) $(OBJS) $(ICON) $(RNDLIBS) $(LDFLAGS) -o $(PROGNAME) ifdef BUILD_DIST - strip $(PROGNAME) + $(STRIP) $(PROGNAME) endif libgame_dir: