shithub: cstory

Download patch

ref: 6c7d49ad503190f943380f36812c7128453710c1
parent: 7c12e7817cfd69ecbc0bc330004adcc1ac1c7252
author: Clownacy <Clownacy@users.noreply.github.com>
date: Tue Jul 16 08:25:22 EDT 2019

Added DoConfig to the Makefile

--- a/Makefile
+++ b/Makefile
@@ -11,9 +11,11 @@
 	CXXFLAGS = -O3 -flto
 	LDFLAGS = -s
 	FILENAME_DEF = CSE2
+	DOCONFIG_FILENAME_DEF = DoConfig
 else
 	CXXFLAGS = -Og -g3
 	FILENAME_DEF = CSE2_debug
+	DOCONFIG_FILENAME_DEF = DoConfig_debug
 endif
 
 ifeq ($(JAPANESE), 1)
@@ -25,6 +27,7 @@
 endif
 
 FILENAME ?= $(FILENAME_DEF)
+DOCONFIG_FILENAME ?= $(DOCONFIG_FILENAME_DEF)
 
 ifeq ($(FIX_BUGS), 1)
 	CXXFLAGS += -DFIX_BUGS
@@ -218,7 +221,7 @@
 	OBJECTS += obj/$(FILENAME)/win_icon.o
 endif
 
-all: $(BUILD_DIRECTORY)/$(FILENAME) $(BUILD_DIRECTORY)/data
+all: $(BUILD_DIRECTORY)/$(FILENAME) $(BUILD_DIRECTORY)/data $(BUILD_DIRECTORY)/$(DOCONFIG_FILENAME)
 	@echo Finished
 
 $(BUILD_DIRECTORY)/data: $(DATA_DIRECTORY)
@@ -256,6 +259,15 @@
 obj/$(FILENAME)/win_icon.o: $(ASSETS_DIRECTORY)/resources/ICON/ICON.rc $(ASSETS_DIRECTORY)/resources/ICON/0.ico $(ASSETS_DIRECTORY)/resources/ICON/ICON_MINI.ico
 	@mkdir -p $(@D)
 	@windres $< $@
+
+$(BUILD_DIRECTORY)/$(DOCONFIG_FILENAME): DoConfig/DoConfig.cpp
+	@mkdir -p $(@D)
+	@echo Linking $@
+ifeq ($(STATIC), 1)
+	@$(CXX) -O3 -s -std=c++98 -static $^ -o $@ `fltk-config --cxxflags --libs --ldstaticflags`
+else
+	@$(CXX) -O3 -s -std=c++98 $^ -o $@ `fltk-config --cxxflags --libs --ldflags`
+endif
 
 # TODO
 clean: