X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FMakefile;h=ebe3091f7b26ea5d538b82541250ad450f472d9c;hb=6f20c46794de2b6e936f9f9ea46f893a059ffd47;hp=854d6e2f7c4a63b3c5a04fb912e0a675c866113b;hpb=3c53030b9e20c59004046274e94eff2ee90d0ab5;p=rocksndiamonds.git diff --git a/src/Makefile b/src/Makefile index 854d6e2f..ebe3091f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -98,22 +98,34 @@ endif # ----------------------------------------------------------------------------- ifeq ($(TARGET),x11) # compiling for X11 target -SYS_CFLAGS = -DTARGET_X11 $(X11_INCL) +SYS_CFLAGS = -DTARGET_X11 $(X11_INCL) SYS_LDFLAGS = $(X11_LIBS) endif ifeq ($(TARGET),sdl) # compiling for SDL target -SYS_CFLAGS = -DTARGET_SDL $(shell sdl-config --cflags) +SYS_CFLAGS = -DTARGET_SDL $(shell sdl-config --cflags) SDL_LIBS = -lSDL_image -lSDL_mixer -lSDL_net -lsmpeg SYS_LDFLAGS = $(SDL_LIBS) $(shell sdl-config --libs) endif +ifeq ($(TARGET),sdl2) # compiling for SDL2 target +SYS_CFLAGS = -DTARGET_SDL2 $(shell sdl2-config --cflags) +SDL_LIBS = -lSDL2_image -lSDL2_mixer -lSDL2_net -lsmpeg2 +SYS_LDFLAGS = $(SDL_LIBS) $(shell sdl2-config --libs) +endif + ifeq ($(TARGET),sdl-static) # compiling for SDL target (static) -SYS_CFLAGS = -DTARGET_SDL $(shell sdl-config --cflags) +SYS_CFLAGS = -DTARGET_SDL $(shell sdl-config --cflags) SDL_LIBS = -lSDL_image -lSDL_mixer -lSDL_net -lsmpeg -lmikmod SYS_LDFLAGS = $(SDL_LIBS) $(shell sdl-config --static-libs) endif +ifeq ($(TARGET),sdl2-static) # compiling for SDL2 target (static) +SYS_CFLAGS = -DTARGET_SDL2 $(shell sdl2-config --cflags) +SDL_LIBS = -lSDL2_image -lSDL2_mixer -lSDL2_net -lsmpeg2 -lmikmod +SYS_LDFLAGS = $(SDL_LIBS) $(shell sdl2-config --static-libs) +endif + ifeq ($(TARGET),allegro) # compiling for Allegro target SYS_CFLAGS = -DTARGET_ALLEGRO -I$(CROSS_PATH_MSDOS)/include SYS_LDFLAGS = -lalleg @@ -327,13 +339,13 @@ clean: clean-obj clean-ico clean-bin # run and test targets # ----------------------------------------------------------------------------- -run: all +run: cd .. && ./$(PROGBASE) --verbose -gdb: all +gdb: cd .. && gdb -batch -x GDB_COMMANDS ./$(PROGBASE) -valgrind: all +valgrind: cd .. && valgrind -v --leak-check=yes ./$(PROGBASE) 2> valgrind.out