aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-04-19 10:49:59 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-04-19 10:49:59 +0000
commit9f9bae0844704ba541462fcc412480c21547f369 (patch)
treeb0fbbd3bb9292d414914ba12b7eb2585bede694c
parentd6cf58a5e4288d3796cbd0a6a7071a4c036616bb (diff)
downloadusdx-9f9bae0844704ba541462fcc412480c21547f369.tar.gz
usdx-9f9bae0844704ba541462fcc412480c21547f369.tar.xz
usdx-9f9bae0844704ba541462fcc412480c21547f369.zip
configure and make for plugins
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1682 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Makefile.in19
-rwxr-xr-xconfigure2
-rw-r--r--plugins/Makefile.in155
3 files changed, 174 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index ad94259d..aaf9b9a1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -58,6 +58,7 @@ USDX_GAME_DIR := $(top_srcdir)/game
USDX_TOOLS_DIR := $(top_srcdir)/tools
USDX_BUILD_DIR := $(top_srcdir)/build
USDX_LIB_DIR := $(USDX_SRC_DIR)/lib
+USDX_PLUGIN_DIR := $(top_srcdir)/plugins
INSTALL_DATADIR := $(datadir)/$(USDX_PACKAGE_NAME)
@@ -113,6 +114,7 @@ BUILD_TARGETS = all debug release rebuild build
.PHONY: $(BUILD_TARGETS)
$(BUILD_TARGETS): all-deps
$(MAKE) -C $(USDX_SRC_DIR) $@
+ $(MAKE) -C $(USDX_PLUGIN_DIR) all
.PHONY: all-deps
all-deps:
@@ -213,13 +215,22 @@ install-strip:
install
.PHONY: install-all
-install-all: install-exec install-data
+install-all: install-exec install-plugins install-data
.PHONY: install-exec
install-exec:
$(MKDIR) "$(DESTDIR)$(bindir)"
$(INSTALL_PROGRAM) "$(USDX_BIN)" "$(DESTDIR)$(bindir)"
+# FPC target platform and processor
+PPLATFORM := @FPC_PLATFORM@
+PPROCESSOR := @FPC_PROCESSOR@
+
+.PHONY: install-plugins
+install-plugins:
+ $(MKDIR) "$(DESTDIR)$(INSTALL_DATADIR)/plugins"
+ $(INSTALL) "$(USDX_BUILD_DIR)"/fpc-$(PPROCESSOR)-$(PPLATFORM)/lib* "$(DESTDIR)$(INSTALL_DATADIR)/plugins"
+
.PHONY: install-data
install-data:
$(MAKE) RECURSIVE_SRC_DIR="artwork" \
@@ -265,7 +276,7 @@ install-data-recursive:
uninstall: uninstall-all
.PHONY: uninstall-all
-uninstall-all: uninstall-data uninstall-exec
+uninstall-all: uninstall-data uninstall-exec uninstall-plugins
.PHONY: uninstall-data
uninstall-data:
@@ -282,6 +293,10 @@ uninstall-data:
uninstall-exec:
$(RM) "$(DESTDIR)$(bindir)/$(USDX_BIN_NAME)"
+.PHONY: uninstall-plugins
+uninstall-plugins:
+ $(RM_REC) "$(DESTDIR)$(INSTALL_DATADIR)/plugins"
+
#################################################
# Distributable source-package (TODO)
#################################################
diff --git a/configure b/configure
index 547bb569..c1edbf6b 100755
--- a/configure
+++ b/configure
@@ -6271,6 +6271,8 @@ ac_config_files="$ac_config_files Makefile"
ac_config_files="$ac_config_files src/Makefile"
+ac_config_files="$ac_config_files plugins/Makefile"
+
ac_config_files="$ac_config_files src/config-$FPC_PLATFORM.inc:src/config.inc.in"
if [ x$libprojectM_USE_CWRAPPER = xyes ]; then
diff --git a/plugins/Makefile.in b/plugins/Makefile.in
new file mode 100644
index 00000000..4bae46b3
--- /dev/null
+++ b/plugins/Makefile.in
@@ -0,0 +1,155 @@
+#################################################
+# @PACKAGE_STRING@
+# @configure_input@
+#################################################
+
+@SET_MAKE@
+SHELL = /bin/sh
+
+#################################################
+# Standard definitions
+#################################################
+
+top_srcdir ?= @top_srcdir@
+srcdir ?= @srcdir@
+
+#################################################
+# Tools
+#################################################
+
+RM ?= rm -f
+
+#################################################
+# USDX Paths
+#################################################
+
+USDX_SRC_DIR := $(top_srcdir)/src
+USDX_BUILD_DIR := $(top_srcdir)/build
+USDX_LIB_DIR := $(USDX_SRC_DIR)/lib
+
+#################################################
+# FPC config
+#################################################
+
+# Free Pascal compiler binary
+PPC := @PPC@
+# FPC target platform and processor
+PPLATFORM := @FPC_PLATFORM@
+PPROCESSOR := @FPC_PROCESSOR@
+
+# Directories added to the unit path
+PUNIT_FLAGS := -FE../build/fpc-$(PPROCESSOR)-$(PPLATFORM) -Fu../build/fpc-$(PPROCESSOR)-$(PPLATFORM)
+
+# Directory where compiled units (.ppu, .o and library files) are stored
+PCUNIT_DIR := $(USDX_BUILD_DIR)/fpc-$(PPROCESSOR)-$(PPLATFORM)
+PCUNIT_FLAGS := -FU$(PCUNIT_DIR)
+
+# Directories added to the includes path
+PINC_FLAGS := -Fi$(USDX_LIB_DIR)/JEDI-SDL/SDL/Pas
+
+# Flags for the treatment of a linker issue with SDL.
+# Symbol _SDK_main is undefined
+PFLAGS_SDL := -k-U -k_SDL_main
+
+##
+# PFLAGS
+##
+
+# Defined on debug mode
+ENABLE_DEBUG := @ENABLE_DEBUG@
+
+# Note:
+# - PFLAGS/PFLAGS_* defaults to $(PFLAGS_XYZ_DEFAULT) if not set by the user
+# - if PFLAGS is defined, PFLAGS_* will be ignored on "make all"
+PFLAGS ?= @PFLAGS@
+PFLAGS_BASE ?= @PFLAGS_BASE@
+PFLAGS_DEBUG ?= @PFLAGS_DEBUG@
+PFLAGS_RELEASE ?= @PFLAGS_RELEASE@
+
+# Do not overwrite, just add extra flags
+PFLAGS_EXTRA += @PFLAGS_EXTRA@
+
+# Default PFLAGS, used if PFLAGS/PFLAGS_* was not set by the user
+# - Do not use -dDEBUG because it will enable unwanted features
+# - Do not strip executable (-Xs, set by fpc.cfg) to be GNU make conformant
+# - Use DEBUG_MODE instead of DEBUG to avoid enabling the fpc.cfg DEBUG preset
+# - The flag -vB appends the full path to filenames
+# - Note that fpc.cfg already defines -vinw, so add -v0 first
+# - The stack check (-Ct) might not work with enabled threading
+# - Do we need -Coi?
+PFLAGS_BASE_DEFAULT := -Si -Sg- -Sc- -v0Binwe
+PFLAGS_DEBUG_DEFAULT := -Xs- -g -gl -dDEBUG_MODE
+PFLAGS_RELEASE_DEFAULT := -Xs- -O2
+PFLAGS_EXTRA_DEFAULT :=
+
+# Debug/Release mode flags
+# Note that flags will overwrite previously specified flags,
+# e.g. "-vinwe -vi-" is the same as "-vnwe"
+PFLAGS_DEBUG_ALL := $(PFLAGS_BASE) $(PFLAGS_DEBUG) $(PFLAGS_EXTRA)
+PFLAGS_RELEASE_ALL := $(PFLAGS_BASE) $(PFLAGS_RELEASE) $(PFLAGS_EXTRA)
+
+# Choose default PFLAGS, depending on debug mode.
+# Only used if PFLAGS was not set by the user.
+ifdef ENABLE_DEBUG
+PFLAGS_DEFAULT := $(PFLAGS_DEBUG_ALL)
+else
+PFLAGS_DEFAULT := $(PFLAGS_RELEASE_ALL)
+endif
+
+PFLAGS_ALL = $(PFLAGS) $(PDEFINES) $(PINC_FLAGS) $(PUNIT_FLAGS) $(PCUNIT_FLAGS)
+
+.PHONY: all
+all: SDK 5000Points Blind Dont_Get_Worse Duell Team_Duell
+
+.PHONY: SDK
+SDK: clean-SDK
+ $(PPC) $(strip $(PFLAGS_ALL)) SDK/ModiSDK.pas
+ $(PPC) $(strip $(PFLAGS_ALL)) SDK/USDXStrUtils.pas
+
+.PHONY: 5000Points
+5000Points: SDK clean-5000Points
+ $(PPC) $(strip $(PFLAGS_ALL)) 5000Points/Until5000.dpr
+
+.PHONY: Blind
+Blind: SDK clean-Blind
+ $(PPC) $(strip $(PFLAGS_ALL)) Blind/Blind.dpr
+
+.PHONY: Duell
+Duell: SDK clean-Duell
+ $(PPC) $(strip $(PFLAGS_ALL)) Duell/Duell.dpr
+
+.PHONY: Team_Duell
+Team_Duell: SDK clean-Team_Duell
+ $(PPC) $(PFLAGS_SDL) $(strip $(PFLAGS_ALL)) Team_Duell/TeamDuell.dpr
+
+.PHONY: Dont_Get_Worse
+Dont_Get_Worse: SDK clean-Dont_Get_Worse
+ $(PPC) $(PFLAGS_SDL) $(strip $(PFLAGS_ALL)) Don\'t_Get_Worse/Hold_The_Line.dpr
+
+.PHONY: clean-plugins
+clean-plugins: clean-SDK clean-5000Points clean-Blind clean-Dont_Get_Worse clean-Duell clean-Team_Duell
+
+.PHONY: clean-SDK
+clean-SDK:
+ $(RM) $(PCUNIT_DIR)/ModiSDK.o $(PCUNIT_DIR)/ModiSDK.ppu
+ $(RM) $(PCUNIT_DIR)/USDXStrUtils.o $(PCUNIT_DIR)/USDXStrUtils.ppu
+
+.PHONY: clean-5000Points
+clean-5000Points:
+ $(RM) $(PCUNIT_DIR)/Until5000.o $(PCUNIT_DIR)/libUntil5000.*
+
+.PHONY: clean-Blind
+clean-Blind:
+ $(RM) $(PCUNIT_DIR)/Blind.o $(PCUNIT_DIR)/libBlind.*
+
+.PHONY: clean-Duell
+clean-Duell:
+ $(RM) $(PCUNIT_DIR)/Duell.o $(PCUNIT_DIR)/libDuell.*
+
+.PHONY: clean-Team_Duell
+clean-Team_Duell:
+ $(RM) $(PCUNIT_DIR)/TeamDuell.o $(PCUNIT_DIR)/libTeamDuell.*
+
+.PHONY: clean-Dont_Get_Worse
+clean-Dont_Get_Worse:
+ $(RM) $(PCUNIT_DIR)/Hold_The_Line.o $(PCUNIT_DIR)/libHold_The_Line.*