git @ Cat's Eye Technologies linapple / af53942
Find and specify the RESOURCE_DIR when building the executable. Chris Pressey 4 years ago
2 changed file(s) with 8 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
1212 CURL_CFLAGS = $(shell $(CURL_CONFIG) --cflags)
1313 CURL_LIBS = $(shell $(CURL_CONFIG) --libs)
1414
15 # build with `RESOURCE_DIR=. make` to get the legacy behaviour of loading resource files from the current directory
16 RESOURCE_DIR ?= $(shell (cd .. && pwd))
17
1518 CXXFLAGS += $(SDL_CFLAGS)
1619 CXXFLAGS += $(CURL_CFLAGS)
20 CXXFLAGS += -DRESOURCE_DIR=\"$(RESOURCE_DIR)/\"
1721 LDLIBS += $(SDL_LIBS) $(CURL_LIBS) -lz -lzip
1822
1923 # Define executable and installing directory
0 #define RESOURCE_ICON_BMP "icon.bmp"
1 #define RESOURCE_SPLASH_BMP "splash.bmp"
2 #define RESOURCE_CHARSET40_BMP "charset40.bmp"
3 #define RESOURCE_FONT_BMP "font.bmp"
0 #define RESOURCE_ICON_BMP RESOURCE_DIR "icon.bmp"
1 #define RESOURCE_SPLASH_BMP RESOURCE_DIR "splash.bmp"
2 #define RESOURCE_CHARSET40_BMP RESOURCE_DIR "charset40.bmp"
3 #define RESOURCE_FONT_BMP RESOURCE_DIR "font.bmp"