Allow third-party in-source files to go in the external folder
This commit is contained in:
parent
cdbcd5f6c3
commit
c4599bc146
2 changed files with 80 additions and 77 deletions
|
@ -328,6 +328,9 @@ set_target_properties(CSE2 PROPERTIES
|
||||||
CXX_EXTENSIONS OFF
|
CXX_EXTENSIONS OFF
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Include directory for third-party software
|
||||||
|
target_include_directories(CSE2 PRIVATE "external")
|
||||||
|
|
||||||
# Name debug builds "CSE2_debug", to distinguish them
|
# Name debug builds "CSE2_debug", to distinguish them
|
||||||
set_target_properties(CSE2 PROPERTIES DEBUG_OUTPUT_NAME "CSE2_debug")
|
set_target_properties(CSE2 PROPERTIES DEBUG_OUTPUT_NAME "CSE2_debug")
|
||||||
|
|
||||||
|
|
154
Makefile
154
Makefile
|
@ -46,7 +46,7 @@ ifeq ($(RASPBERRY_PI), 1)
|
||||||
CXXFLAGS += -DRASPBERRY_PI
|
CXXFLAGS += -DRASPBERRY_PI
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CXXFLAGS += -std=c++98 `pkg-config sdl2 --cflags` `pkg-config freetype2 --cflags` -MMD -MP -MF $@.d
|
CXXFLAGS += -std=c++98 -Iexternal `pkg-config sdl2 --cflags` `pkg-config freetype2 --cflags` -MMD -MP -MF $@.d
|
||||||
|
|
||||||
ifeq ($(STATIC), 1)
|
ifeq ($(STATIC), 1)
|
||||||
LDFLAGS += -static
|
LDFLAGS += -static
|
||||||
|
@ -57,77 +57,77 @@ endif
|
||||||
|
|
||||||
# For an accurate result to the original's code, compile in alphabetical order
|
# For an accurate result to the original's code, compile in alphabetical order
|
||||||
SOURCES = \
|
SOURCES = \
|
||||||
ArmsItem \
|
src/ArmsItem \
|
||||||
Back \
|
src/Back \
|
||||||
Boss \
|
src/Boss \
|
||||||
BossAlmo1 \
|
src/BossAlmo1 \
|
||||||
BossAlmo2 \
|
src/BossAlmo2 \
|
||||||
BossBallos \
|
src/BossBallos \
|
||||||
BossFrog \
|
src/BossFrog \
|
||||||
BossIronH \
|
src/BossIronH \
|
||||||
BossLife \
|
src/BossLife \
|
||||||
BossOhm \
|
src/BossOhm \
|
||||||
BossPress \
|
src/BossPress \
|
||||||
BossTwinD \
|
src/BossTwinD \
|
||||||
BossX \
|
src/BossX \
|
||||||
BulHit \
|
src/BulHit \
|
||||||
Bullet \
|
src/Bullet \
|
||||||
Caret \
|
src/Caret \
|
||||||
Config \
|
src/Config \
|
||||||
Draw \
|
src/Draw \
|
||||||
Ending \
|
src/Ending \
|
||||||
Escape \
|
src/Escape \
|
||||||
Fade \
|
src/Fade \
|
||||||
File \
|
src/File \
|
||||||
Flags \
|
src/Flags \
|
||||||
Flash \
|
src/Flash \
|
||||||
Font \
|
src/Font \
|
||||||
Frame \
|
src/Frame \
|
||||||
Game \
|
src/Game \
|
||||||
Generic \
|
src/Generic \
|
||||||
GenericLoad \
|
src/GenericLoad \
|
||||||
Input \
|
src/Input \
|
||||||
KeyControl \
|
src/KeyControl \
|
||||||
Main \
|
src/Main \
|
||||||
Map \
|
src/Map \
|
||||||
MapName \
|
src/MapName \
|
||||||
MiniMap \
|
src/MiniMap \
|
||||||
MyChar \
|
src/MyChar \
|
||||||
MycHit \
|
src/MycHit \
|
||||||
MycParam \
|
src/MycParam \
|
||||||
NpcAct000 \
|
src/NpcAct000 \
|
||||||
NpcAct020 \
|
src/NpcAct020 \
|
||||||
NpcAct040 \
|
src/NpcAct040 \
|
||||||
NpcAct060 \
|
src/NpcAct060 \
|
||||||
NpcAct080 \
|
src/NpcAct080 \
|
||||||
NpcAct100 \
|
src/NpcAct100 \
|
||||||
NpcAct120 \
|
src/NpcAct120 \
|
||||||
NpcAct140 \
|
src/NpcAct140 \
|
||||||
NpcAct160 \
|
src/NpcAct160 \
|
||||||
NpcAct180 \
|
src/NpcAct180 \
|
||||||
NpcAct200 \
|
src/NpcAct200 \
|
||||||
NpcAct220 \
|
src/NpcAct220 \
|
||||||
NpcAct240 \
|
src/NpcAct240 \
|
||||||
NpcAct260 \
|
src/NpcAct260 \
|
||||||
NpcAct280 \
|
src/NpcAct280 \
|
||||||
NpcAct300 \
|
src/NpcAct300 \
|
||||||
NpcAct320 \
|
src/NpcAct320 \
|
||||||
NpcAct340 \
|
src/NpcAct340 \
|
||||||
NpChar \
|
src/NpChar \
|
||||||
NpcHit \
|
src/NpcHit \
|
||||||
NpcTbl \
|
src/NpcTbl \
|
||||||
Organya \
|
src/Organya \
|
||||||
PixTone \
|
src/PixTone \
|
||||||
Profile \
|
src/Profile \
|
||||||
Resource \
|
src/Resource \
|
||||||
SelStage \
|
src/SelStage \
|
||||||
Shoot \
|
src/Shoot \
|
||||||
Sound \
|
src/Sound \
|
||||||
Stage \
|
src/Stage \
|
||||||
Star \
|
src/Star \
|
||||||
TextScr \
|
src/TextScr \
|
||||||
Triangle \
|
src/Triangle \
|
||||||
ValueView
|
src/ValueView
|
||||||
|
|
||||||
RESOURCES = \
|
RESOURCES = \
|
||||||
BITMAP/Credit01.bmp \
|
BITMAP/Credit01.bmp \
|
||||||
|
@ -209,7 +209,7 @@ ifneq ($(WINDOWS), 1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(RENDERER), OpenGL3)
|
ifeq ($(RENDERER), OpenGL3)
|
||||||
SOURCES += Backends/Rendering/OpenGL3
|
SOURCES += src/Backends/Rendering/OpenGL3
|
||||||
CXXFLAGS += `pkg-config glew --cflags`
|
CXXFLAGS += `pkg-config glew --cflags`
|
||||||
|
|
||||||
ifeq ($(STATIC), 1)
|
ifeq ($(STATIC), 1)
|
||||||
|
@ -218,11 +218,11 @@ ifeq ($(RENDERER), OpenGL3)
|
||||||
LIBS += `pkg-config glew --libs`
|
LIBS += `pkg-config glew --libs`
|
||||||
endif
|
endif
|
||||||
else ifeq ($(RENDERER), Texture)
|
else ifeq ($(RENDERER), Texture)
|
||||||
SOURCES += Backends/Rendering/SDLTexture
|
SOURCES += src/Backends/Rendering/SDLTexture
|
||||||
else ifeq ($(RENDERER), Surface)
|
else ifeq ($(RENDERER), Surface)
|
||||||
SOURCES += Backends/Rendering/SDLSurface
|
SOURCES += src/Backends/Rendering/SDLSurface
|
||||||
else ifeq ($(RENDERER), Software)
|
else ifeq ($(RENDERER), Software)
|
||||||
SOURCES += Backends/Rendering/Software
|
SOURCES += src/Backends/Rendering/Software
|
||||||
else
|
else
|
||||||
@echo Invalid RENDERER selected; this build will fail
|
@echo Invalid RENDERER selected; this build will fail
|
||||||
endif
|
endif
|
||||||
|
@ -247,7 +247,7 @@ $(BUILD_DIRECTORY)/$(FILENAME): $(OBJECTS)
|
||||||
@echo Linking $@
|
@echo Linking $@
|
||||||
@$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
|
@$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
|
||||||
|
|
||||||
obj/$(FILENAME)/%.o: src/%.cpp
|
obj/$(FILENAME)/%.o: %.cpp
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
@echo Compiling $<
|
@echo Compiling $<
|
||||||
@$(CXX) $(CXXFLAGS) $< -o $@ -c
|
@$(CXX) $(CXXFLAGS) $< -o $@ -c
|
||||||
|
|
Loading…
Add table
Reference in a new issue