Skip to content

Commit

Permalink
avoid building sdl if prebuilt libs exist (regression)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmaclarty committed Aug 28, 2016
1 parent 7e053e5 commit 1c3bbcb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions Common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ ifeq ($(GRADE),debug)
GRADE_CFLAGS = -MTd -Zi
GRADE_LDFLAGS = -DEBUG
LUA_CFLAGS += -DLUA_USE_APICHECK
LUAJIT_FLAGS += CFLAGS="-DLUA_USE_APICHECK -g" LDFLAGS=-g
else
GRADE_CFLAGS = -g -O1
GRADE_LDFLAGS = -g
Expand Down
16 changes: 11 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,17 @@ $(AM_OBJ_FILES): $(BUILD_OBJ_DIR)/%$(OBJ_EXT): $(SRC_DIR)/%.cpp $(AM_H_FILES) $(
$(BUILD_OBJ_DIR)/am_buffer$(OBJ_EXT): $(SRC_DIR)/am_generated_view_defs.inc $(VIEW_TEMPLATES)

$(SDL_ALIB): | $(BUILD_LIB_DIR) $(BUILD_INC_DIR)
BASE_DIR=`pwd`; \
cd $(SDL_DIR) && ./configure --disable-render --disable-loadso CC=$(CC) CXX=$(CPP) CFLAGS="$(COMMON_CFLAGS)" LDFLAGS="$(LDFLAGS)" && $(MAKE) clean && $(MAKE); \
cd $$BASE_DIR; \
cp -r $(SDL_DIR)/include/* $(BUILD_INC_DIR)/; \
cp $(SDL_DIR)/build/.libs/libSDL2$(ALIB_EXT) $@; \
if [ -d $(SDL_PREBUILT_DIR) ]; then \
cp $(SDL_PREBUILT_DIR)/lib/*.a $(BUILD_LIB_DIR)/; \
cp -r $(SDL_DIR)/include/* $(BUILD_INC_DIR)/; \
cp -r $(SDL_PREBUILT_DIR)/include/* $(BUILD_INC_DIR)/; \
else \
BASE_DIR=`pwd`; \
cd $(SDL_DIR) && ./configure --disable-render --disable-loadso CC=$(CC) CXX=$(CPP) CFLAGS="$(COMMON_CFLAGS)" LDFLAGS="$(LDFLAGS)" && $(MAKE) clean && $(MAKE); \
cd $$BASE_DIR; \
cp -r $(SDL_DIR)/include/* $(BUILD_INC_DIR)/; \
cp $(SDL_DIR)/build/.libs/libSDL2$(ALIB_EXT) $@; \
fi

$(SDL_PREBUILT): | $(BUILD_LIB_DIR) $(BUILD_INC_DIR) $(BUILD_BIN_DIR)
cp -r $(SDL_PREBUILT_DIR)/include/* $(BUILD_INC_DIR)/
Expand Down

0 comments on commit 1c3bbcb

Please sign in to comment.