aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Game/Code/Makefile.in141
1 files changed, 141 insertions, 0 deletions
diff --git a/Game/Code/Makefile.in b/Game/Code/Makefile.in
new file mode 100644
index 00000000..b702f8d6
--- /dev/null
+++ b/Game/Code/Makefile.in
@@ -0,0 +1,141 @@
+##
+# Makefile for @PACKAGE_NAME@ @PACKAGE_VERSION@
+# @PACKAGE_BUGREPORT@
+##
+
+# general definitions
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+infodir = @infodir@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+datarootdir = @datarootdir@
+
+# install tool
+INSTALL = @INSTALL@
+# calls "ln -s"
+LN_S = @LN_S@
+
+USDX_PREFIX = UltraStar
+USDX_TOOLS_DIR = ../../Tools
+
+EXE_SUFFIX = @EXEEXT@
+
+# Free Pascal compiler
+PPC = @PPC@
+PFLAGS = @PFLAGS@
+# FPC target platform and processor
+PPLATFORM = @FPC_PLATFORM@
+PPROCESSOR = @FPC_PROCESSOR@
+
+# lazarus defines
+LAZARUS_DIR = @LAZARUS_DIR@
+PROJ_SUFFIX = .lpr
+
+# RC to LRS resource compiler
+RESCOMPILER_NAME = USDXResCompiler
+RESCOMPILER_BIN = $(USDX_TOOLS_DIR)/$(RESCOMPILER_NAME)$(EXE_SUFFIX)
+RESCOMPILER_SRC = $(USDX_TOOLS_DIR)/$(RESCOMPILER_NAME)$(PROJ_SUFFIX)
+RESCOMPILER_PFLAGS = -dRELEASE
+
+RES_SUFFIX = .lrs
+
+# Directories added to the unit path
+PUNIT_TOKEN = -Fu
+PUNIT_FLAGS = $(PUNIT_TOKEN)$(LAZARUS_DIR)/lcl/units/$(PPROCESSOR)-$(PPLATFORM) \
+ $(PUNIT_TOKEN)$(LAZARUS_DIR)/components/images/lib/$(PPROCESSOR)-$(PPLATFORM) \
+ $(PUNIT_TOKEN)$(LAZARUS_DIR)/components/jpeg \
+ $(PUNIT_TOKEN).
+
+# Directory where compiled units (.ppu and .o files) are stored
+PCUNIT_TOKEN = -FU
+PCUNIT_DIR = ./build/$(PPLATFORM)/lazarus
+PCUNIT_FLAGS = $(PCUNIT_TOKEN)$(PCUNIT_DIR)
+
+# Directories added to the includes path
+PINC_TOKEN = -Fi
+PINC_FLAGS = $(PINC_TOKEN)lib/JEDI-SDLv1.0/SDL/Pas
+
+# Defines
+PDEFINES = -dLCL
+
+# Misc fpc options
+PCOMPAT_FLAGS = -S2dgi
+#PCOMPAT_FLAGS += -Mdelphi
+PVERBOSE_FLAGS = -vew -l
+#PDEBUG_FLAGS = -g -gl
+#PDEBUG_FLAGS = -dDEBUG
+#POTHER_FLAGS = -Crtoi
+#POPTIMIZE_FLAGS_FPC204 = -OG2p3
+#POPTIMIZE_FLAGS_FPC220 = -O2p"NAME"
+#POPTIMIZE_FLAGS = -dRELEASE
+#POPTIMIZE_FLAGS = -Xs
+PFLAGS += $(PCOMPAT_FLAGS) \
+ $(PVERBOSE_FLAGS) \
+ $(PDEFINES)
+
+# lpr project file used as input
+USDX_SRC = $(USDX_PREFIX)$(PROJ_SUFFIX)
+# name of executable
+USDX_BIN = $(USDX_PREFIX)$(EXE_SUFFIX)
+# name of resource
+USDX_RES = $(USDX_PREFIX)$(RES_SUFFIX)
+
+.PHONY: all resources ultrastar install uninstall clean distclean clean_obj clean_res
+
+all: resources ultrastar
+
+resources: $(USDX_RES)
+
+# we need to rebuild everything, fpc does some sort of caching of old files,
+# so we have to delete all the old stuff first
+ultrastar: clean_obj
+ mkdir -p $(PCUNIT_DIR)
+ $(PPC) $(PFLAGS) $(PINC_FLAGS) $(PUNIT_FLAGS) $(PCUNIT_FLAGS) -o$(USDX_BIN) $(USDX_SRC)
+
+install: all
+# $()/mkinstalldirs $(bindir)
+# $()/mkinstalldirs $(libdir)
+# $()/mkinstalldirs $(infodir)
+ mv $(OUTPUT) ../..
+# $(INSTALL) $(USDX_BIN) $(bindir)/$(USDX_BIN)
+
+uninstall:
+# rm -f ...
+ echo "Comming soon!"
+
+clean: clean_obj clean_res
+
+distclean: clean
+ find . -name "*.o" -o -name "*.ppu" -o -name "*.rst" | xargs rm -f
+ find . -name "*.bak" -o -name "*.orig" -o -name "*.dcu" | xargs rm -f
+ find . -name "__history" | xargs rm -r -f
+ rm -f $(OUTPUT).cfg $(OUTPUT).res $(OUTPUT).identcache
+ rm -f config.inc config.log config.status configure
+
+clean_obj:
+ find "$(PCUNIT_DIR)" -name "*.o" -o -name "*.ppu" -o -name "*.rst" | xargs rm -f
+ rm -f $(OUTPUT)
+
+clean_res:
+ rm -f $(USDX_RES) link.res
+
+$(USDX_RES): $(RESCOMPILER_BIN) $(USDX_PREFIX).rc
+ $(RESCOMPILER_BIN) $(USDX_PREFIX).rc
+
+$(RESCOMPILER_BIN): $(RESCOMPILER_SRC)
+ $(PPC) $(RESCOMPILER_PFLAGS) $(PUNIT_FLAGS) $(PCUNIT_FLAGS) -o$@ $(RESCOMPILER_SRC)
+
+configure: configure.ac aclocal.m4
+ autoconf
+
+aclocal.m4: m4/*
+ aclocal -I m4
+
+Makefile: Makefile.in config.status
+ ./config.status
+
+config.status: configure
+ ./config.status --recheck \ No newline at end of file