aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile.in (renamed from src/Makefile.in)399
-rw-r--r--configure.ac (renamed from src/configure.ac)70
-rwxr-xr-xdists/autogen/install-sh (renamed from src/install-sh)0
-rw-r--r--dists/autogen/m4/ac_define_dir.m4 (renamed from src/m4/ac_define_dir.m4)0
-rw-r--r--dists/autogen/m4/fpc.m4 (renamed from src/m4/fpc.m4)0
-rwxr-xr-xsrc/autogen.sh1
-rw-r--r--src/build.bat4
-rw-r--r--src/lib/portaudio/portaudio.pas (renamed from src/lib/portaudio/delphi/portaudio.pas)0
-rw-r--r--src/lib/portmixer/portmixer.pas (renamed from src/lib/portmixer/delphi/portmixer.pas)0
-rw-r--r--src/lib/projectM/cwrapper/Makefile.in11
-rw-r--r--src/ultrastardx.dpr4
-rw-r--r--test/switches.inc (renamed from src/unit-tests/switches.inc)0
-rw-r--r--test/test_libraries.lpi (renamed from src/unit-tests/test_libraries.lpi)0
-rw-r--r--test/test_libraries.lpr (renamed from src/unit-tests/test_libraries.lpr)0
-rw-r--r--test/testsqllite.pas (renamed from src/unit-tests/testsqllite.pas)0
15 files changed, 216 insertions, 273 deletions
diff --git a/src/Makefile.in b/Makefile.in
index 2aea0943..487f01a5 100644
--- a/src/Makefile.in
+++ b/Makefile.in
@@ -1,184 +1,196 @@
#################################################
-# Makefile for @PACKAGE_STRING@
+# @PACKAGE_STRING@
# @configure_input@
#################################################
-# general definitions
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-libdir = @libdir@
-infodir = @infodir@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-datarootdir = @datarootdir@
-VPATH = @srcdir@
-usdxrootdir = @usdxrootdir@
+@SET_MAKE@
-INSTALL_PATH_SUFFIX = @suffix@
-INSTALL_datadir = $(datarootdir)/$(INSTALL_PATH_SUFFIX)
+#################################################
+# Standard definitions
+#################################################
-@SET_MAKE@
+prefix ?= @prefix@
+exec_prefix ?= @exec_prefix@
+bindir ?= @bindir@
+datarootdir ?= @datarootdir@
+# project root-dir (directory of configure script)
+top_srcdir ?= @top_srcdir@
+# project src-dir (directory of the current Makefile)
+srcdir ?= @srcdir@
+
+# file-type suffix of executables (e.g. ".exe" in windows)
+EXEEXT ?= @EXEEXT@
+
+#################################################
+# Tools
+#################################################
+
+# recursive dir creation tool (mkdir -p)
+MKDIR ?= @MKDIR_P@
+RM ?= rm -f
+RM_REC ?= $(RM) -r
-# recursive dir creation tool
-MKDIR_P = @MKDIR_P@
# install tool
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-# calls "ln -s"
-LN_S = @LN_S@
-
-# Package configuration
-USDX_PACKAGE_NAME = @PACKAGE_NAME@
-# should be $(USDX_PACKAGE_NAME) instead
-USDX_PREFIX = ultrastardx
-USDX_VERSION = @PACKAGE_VERSION@
-USDX_TARNAME = @PACKAGE_TARNAME@
-
-USDX_GAME_DIR = $(usdxrootdir)/game
-USDX_TOOLS_DIR = $(usdxrootdir)/tools
-USDX_LIB_DIR = ./lib
-USDX_BUILD_DIR = ./build
+INSTALL ?= @INSTALL@
+INSTALL_DATA ?= @INSTALL_DATA@
-# file-type suffix of executables (e.g. ".exe" in windows)
-EXE_SUFFIX = @EXEEXT@
-
-# Free Pascal compiler
-PPC = @PPC@
-# FPC target platform and processor
-PPLATFORM = @FPC_PLATFORM@
-PPROCESSOR = @FPC_PROCESSOR@
-
-EXTRA_SRCDIRS =
-
-# RC resource extraction config
-RESEXTRACTOR_NAME = ResourceExtractor
-RESEXTRACTOR_DIR = $(USDX_TOOLS_DIR)/$(RESEXTRACTOR_NAME)
-RESEXTRACTOR_BIN = $(RESEXTRACTOR_DIR)/$(RESEXTRACTOR_NAME)$(EXE_SUFFIX)
-RESOURCE_DIR = $(USDX_GAME_DIR)/resources
-RESOURCE_FILE = resource.inc
-RC_FILE = ultrastardx.rc
-EXTRA_SRCDIRS += $(RESEXTRACTOR_DIR)
-
-# cwrapper settings
-PROJECTM_CWRAPPER_DIR = $(USDX_LIB_DIR)/projectM/cwrapper
-@COMMENT_PROJECTM_CWRAPPER@EXTRA_SRCDIRS += $(PROJECTM_CWRAPPER_DIR)
-
-# Directories added to the unit path
-PUNIT_TOKEN = -Fu
-PUNIT_FLAGS = $(PUNIT_TOKEN).
-
-# Directory where compiled units (.ppu and .o files) are stored
-PCUNIT_TOKEN = -FU
-PCUNIT_DIR = $(USDX_BUILD_DIR)/$(PPLATFORM)/fpc
-PCUNIT_FLAGS = $(PCUNIT_TOKEN)$(PCUNIT_DIR)
-
-# Directories added to the includes path
-PINC_TOKEN = -Fi
-PINC_FLAGS = $(PINC_TOKEN)$(USDX_LIB_DIR)/JEDI-SDL/SDL/Pas
-
-# FPC flags
-
-# The user can overwrite the default flags with
-# make PFLAGS_BASE="myflags"
-PFLAGS_BASE = -S2gi -vB
-# The user can specify additional flags with
-# make PFLAGS_EXTRA="myflags"
-PFLAGS_EXTRA = @PFLAGS_EXTRA@
-PFLAGS_DEBUG = @PFLAGS_DEBUG@
-PFLAGS_RELEASE = @PFLAGS_RELEASE@
-# the user's flags (specified with configure) must be the last in
-# the list to overwrite the defaults (e.g.with the - option: -Xs-).
-PFLAGS = $(PFLAGS_BASE) @PFLAGS_MAKE@ $(PFLAGS_EXTRA)
-
-LIBS = @LIBS@
-LDFLAGS = @LDFLAGS@
-linkflags = $(strip $(LDFLAGS) $(LIBS))
-ifneq ($(linkflags),)
-PLINKFLAGS = -k"$(linkflags)"
-endif
+#################################################
+# General package configuration
+#################################################
+
+USDX_PACKAGE_NAME := @PACKAGE_NAME@
+USDX_VERSION := @PACKAGE_VERSION@
+USDX_TARNAME := @PACKAGE_TARNAME@
+
+#################################################
+# USDX Paths
+#################################################
+
+USDX_SRC_DIR := $(top_srcdir)/src
+USDX_GAME_DIR := $(top_srcdir)/game
+USDX_TOOLS_DIR := $(top_srcdir)/tools
+USDX_LIB_DIR := $(USDX_SRC_DIR)/lib
+USDX_BUILD_DIR := $(USDX_SRC_DIR)/build
+
+AUTOGEN_DIR := $(top_srcdir)/dists/autogen
+
+# installation path
+INSTALL_datadir ?= $(datarootdir)/$(USDX_PACKAGE_NAME)
+
+#################################################
+# Binary name
+#################################################
-# dpr project file used as input
-USDX_SRC = ultrastardx.dpr
# name of executable
-USDX_BIN_NAME = $(USDX_PREFIX)$(EXE_SUFFIX)
-USDX_BIN = $(USDX_GAME_DIR)/$(USDX_BIN_NAME)
+USDX_BIN_NAME ?= ultrastardx$(EXEEXT)
+USDX_BIN := $(USDX_GAME_DIR)/$(USDX_BIN_NAME)
-# name of the modification timestamp filename
-modfile = lastmod
+#################################################
+# ProjectM
+#################################################
-# otool: Mac OS X object file displaying tool
-OTOOL = /usr/bin/otool
-# install_name_tool: Mac OS X tool to change dynamic shared library install names
-INSTALL_NAME_TOOL = /usr/bin/install_name_tool
-# hdiutil: Mac OS X disk image tool
-HDIUTIL = /usr/bin/hdiutil
+PROJECTM_CWRAPPER_DIR := $(USDX_LIB_DIR)/projectM/cwrapper
+USE_PROJECTM_CWRAPPER = @USE_PROJECTM_CWRAPPER@
#################################################
-# general targets
+# Dependencies
#################################################
-.PHONY: debug release recursive all recursive-all dependencies install install-local install-global install-data install-data-recursive install-exec uninstall uninstall-local uninstall-global uninstall-data uninstall-exec clean recursive-clean distclean recursive-distclean clean_obj clean_res dist debian-package update-modfile $(EXTRA_SRCDIRS)
+DEPS := $(USDX_TOOLS_DIR)/ResourceExtractor
+ifeq ($(USE_PROJECTM_CWRAPPER), yes)
+DEPS += $(PROJECTM_CWRAPPER_DIR)
+endif
-debug: PFLAGS = $(PFLAGS_BASE) $(PFLAGS_DEBUG) $(PFLAGS_EXTRA)
-debug: all
+#################################################
+# general targets
+#################################################
-release: PFLAGS = $(PFLAGS_BASE) $(PFLAGS_RELEASE) $(PFLAGS_EXTRA)
-release: all
+BUILD_TARGETS = all debug release rebuild build
+.PHONY: $(BUILD_TARGETS)
+$(BUILD_TARGETS): all-deps
+ $(MAKE) -C src $@
-all: recursive-all update-modfile dependencies $(USDX_BIN)
+.PHONY: all-deps
+all-deps:
+ @for dir in $(DEPS); do \
+ $(MAKE) -C "$$dir" all; \
+ done
+
+.PHONY: clean
+clean: clean-src clean-deps
-recursive-all: recursive-target = all
-recursive-all: recursive
+.PHONY: clean-src
+clean-src:
+ $(MAKE) -C src clean
-dependencies: $(RESOURCE_FILE)
+.PHONY: clean-deps
+clean-deps:
+ @for dir in $(DEPS); do \
+ $(MAKE) -C "$$dir" clean; \
+ done
-# call Makefiles in other source-dirs
-recursive: $(EXTRA_SRCDIRS)
-$(EXTRA_SRCDIRS):
- $(MAKE) -C $@ $(recursive-target)
+.PHONY: mostlyclean
+mostlyclean: clean-src
+
+.PHONY: distclean
+distclean: clean
+ $(RM_REC) config.log config.status aclocal.m4 autom4te.cache
+ $(RM) Makefile $(USDX_SRC_DIR)/Makefile $(PROJECTM_CWRAPPER_DIR)/Makefile
+ $(RM) $(USDX_SRC_DIR)/config.inc
+
+# remove temporary and backup files
+.PHONY: tidy
+tidy:
+# FPC stuff
+ find . -name "*.compiled" | xargs $(RM)
+# Delphi stuff
+ find . -name "__history" | xargs $(RM_REC)
+ find . -name "*.identcache" -o -name "*.dcu" | xargs $(RM)
+# Backup files
+ find . -name "*~" -o -name "*.bak" -o -name "*.orig" | xargs $(RM)
#################################################
-# build
+# auto-update
#################################################
-# clean old data before compiling, otherwise FPC might miss some changes.
-$(USDX_BIN): lastmod
- $(MAKE) clean_obj
- mkdir -p "$(PCUNIT_DIR)"
- $(PPC) $(strip $(PFLAGS) $(PDEFINES) $(PLINKFLAGS) $(PINC_FLAGS) $(PUNIT_FLAGS) $(PCUNIT_FLAGS)) -o$@ $(USDX_SRC)
+Makefile: Makefile.in $(USDX_SRC_DIR)/Makefile.in $(USDX_SRC_DIR)/config.inc.in $(PROJECTM_CWRAPPER_DIR)/Makefile.in config.status
+ @echo "-----------------------------------"
+ @echo "Performing reconfiguration..."
+ ./config.status
+ @echo "-----------------------------------"
+
+config.status: configure
+ ./config.status --recheck
+
+.PHONE: reconf
+reconf:
+ $(AUTOGEN_DIR)/autogen.sh
#################################################
# install/uninstall
#################################################
-install: all install-@install_type@
+.PHONY: install
+install: all
+ $(MAKE) install-@install_type@
+.PHONY: uninstall
uninstall: uninstall-@install_type@
# local build
+.PHONY: install-local
install-local:
+ @echo "Local build does not need to be installed."
+ @echo "Start with: $(USDX_BIN)"
+.PHONY: uninstall-local
uninstall-local:
- rm -f "$(USDX_BIN)"
+ $(RM) "$(USDX_BIN)"
# global build
+.PHONY: install-global
install-global: install-data install-exec
+ @echo "--------------------------------"
+ @echo "$(USDX_PACKAGE_NAME) installed."
+ @echo "Start with: $(bindir)/$(USDX_BIN_NAME)"
+ @echo "--------------------------------"
+.PHONY: install-data
install-data:
- $(MAKE) RECURSIVE_SRC_DIR="$(usdxrootdir)/artwork" RECURSIVE_DST_DIR="$(INSTALL_datadir)/artwork" install-data-recursive
+ $(MAKE) RECURSIVE_SRC_DIR="artwork" RECURSIVE_DST_DIR="$(INSTALL_datadir)/artwork" install-data-recursive
$(MAKE) RECURSIVE_SRC_DIR="$(USDX_GAME_DIR)/languages" RECURSIVE_DST_DIR="$(INSTALL_datadir)/languages" install-data-recursive
$(MAKE) RECURSIVE_SRC_DIR="$(USDX_GAME_DIR)/sounds" RECURSIVE_DST_DIR="$(INSTALL_datadir)/sounds" install-data-recursive
$(MAKE) RECURSIVE_SRC_DIR="$(USDX_GAME_DIR)/themes" RECURSIVE_DST_DIR="$(INSTALL_datadir)/themes" install-data-recursive
$(MAKE) RECURSIVE_SRC_DIR="$(USDX_GAME_DIR)/resources" RECURSIVE_DST_DIR="$(INSTALL_datadir)/resources" install-data-recursive
- $(INSTALL_DATA) "$(usdxrootdir)/License.txt" "$(INSTALL_datadir)"
+ $(INSTALL_DATA) "COPYING.txt" "$(INSTALL_datadir)"
+.PHONY: install-data-recursive
install-data-recursive:
- $(MKDIR_P) "$(RECURSIVE_DST_DIR)"
+ $(MKDIR) "$(RECURSIVE_DST_DIR)"
@for file in "$(RECURSIVE_SRC_DIR)"/*; do \
if test -f "$$file"; then \
echo $(INSTALL_DATA) "$$file" "$(RECURSIVE_DST_DIR)"; \
@@ -191,51 +203,57 @@ install-data-recursive:
fi; \
done
+.PHONY: install-exec
install-exec:
- $(MKDIR_P) "$(bindir)"
+ $(MKDIR) "$(bindir)"
$(INSTALL) "$(USDX_BIN)" "$(bindir)"
+.PHONY: uninstall-global
uninstall-global: uninstall-data uninstall-exec
+.PHONY: uninstall-data
uninstall-data:
- rm -rf "$(INSTALL_datadir)/artwork"
- rm -rf "$(INSTALL_datadir)/languages"
- rm -rf "$(INSTALL_datadir)/sounds"
- rm -rf "$(INSTALL_datadir)/themes"
- rm -rf "$(INSTALL_datadir)/resources"
- rm -f "$(INSTALL_datadir)/License.txt"
+ $(RM_REC) "$(INSTALL_datadir)/artwork"
+ $(RM_REC) "$(INSTALL_datadir)/languages"
+ $(RM_REC) "$(INSTALL_datadir)/sounds"
+ $(RM_REC) "$(INSTALL_datadir)/themes"
+ $(RM_REC) "$(INSTALL_datadir)/resources"
+ $(RM) "$(INSTALL_datadir)/COPYING.txt"
-rmdir "$(INSTALL_datadir)"
+.PHONY: uninstall-exec
uninstall-exec:
- rm -f "$(bindir)/$(USDX_BIN_NAME)"
+ $(RM) "$(bindir)/$(USDX_BIN_NAME)"
#################################################
# Distributable source-package (TODO)
#################################################
-disttmpdir = ./distdir
+disttmpdir ?= disttmp
+.PHONY: dist
dist:
-# $(MKDIR_P) $(disttmpdir)
-# acm $(usdxrootdir) $(disttmpdir)
+# $(MKDIR) $(disttmpdir)
+# cp -R . $(disttmpdir)
# $(MAKE) -C $(disttmpdir)/src distclean
-# tar cvzf $(USDX_TARNAME)-$(USDX_VERSION).tar.gz $(usdxrootdir)
- @echo "Comming soon"
+# tar cvzf $(USDX_TARNAME)-$(USDX_VERSION).tar.gz $(disttmpdir)
+# $(RM_REC) $(disttmpdir)
#################################################
# Debian package
#################################################
-debpkgdir = $(usdxrootdir)/dists/debian
-debpkgtmpdir = $(debpkgdir)/deb-package
-debpkgprefix = $(USDX_PACKAGE_NAME)
-debpkgname = $(debpkgprefix)_$(USDX_VERSION)_$(PPROCESSOR).deb
+debpkgdir ?= dists/debian
+debpkgtmpdir := $(debpkgdir)/deb-package
+debpkgprefix := $(USDX_PACKAGE_NAME)
+debpkgname := $(debpkgprefix)_$(USDX_VERSION)_$(PPROCESSOR).deb
+.PHONY: debian-pkg
debian-pkg: all
- rm -rf $(debpkgtmpdir)
+ $(RM_REC) $(debpkgtmpdir)
- $(MKDIR_P) $(debpkgdir)
- $(MKDIR_P) $(debpkgtmpdir)/DEBIAN
+ $(MKDIR) $(debpkgdir)
+ $(MKDIR) $(debpkgtmpdir)/DEBIAN
$(MAKE) prefix=$(debpkgtmpdir)/$(prefix) install
@@ -244,20 +262,34 @@ debian-pkg: all
dpkg-deb --build $(debpkgtmpdir)
mv $(debpkgtmpdir)/../deb-package.deb $(debpkgdir)/$(debpkgname)
- rm -rf $(debpkgtmpdir)
+ $(RM_REC) $(debpkgtmpdir)
#################################################
# RPM (TODO)
#################################################
+.PHONY: rpm
rpm: all
@echo "Coming soon"
+
+#################################################
+# Mac OS X defines
+#################################################
+
+# otool: Mac OS X object file displaying tool
+OTOOL := /usr/bin/otool
+# install_name_tool: Mac OS X tool to change dynamic shared library install names
+INSTALL_NAME_TOOL := /usr/bin/install_name_tool
+# hdiutil: Mac OS X disk image tool
+HDIUTIL := /usr/bin/hdiutil
+
#################################################
# Mac OS X app-bundle
#################################################
-macosx_bundle_path = $(usdxrootdir)/UltraStarDeluxe.app/Contents
+macosx_bundle_path := UltraStarDeluxe.app/Contents
+.PHONY: macosx-app
macosx-app: all
# Create double clickable Mac OS X application.
@@ -265,14 +297,14 @@ macosx-app: all
@echo "Creating the Mac OS X application"
@echo ""
- $(MKDIR_P) $(macosx_bundle_path)/Resources
+ $(MKDIR) $(macosx_bundle_path)/Resources
# Put the icon file into its particular place.
# Must be done BEFORE info.plist is created.
- $(INSTALL_DATA) $(usdxrootdir)/icons/ultrastardx.icns $(macosx_bundle_path)/Resources/
+ $(INSTALL_DATA) icons/ultrastardx.icns $(macosx_bundle_path)/Resources/
# the info.plist file
- $(INSTALL_DATA) macosx/Info.plist $(macosx_bundle_path)/
+ $(INSTALL_DATA) $(USDX_SRC_DIR)/macosx/Info.plist $(macosx_bundle_path)/
# Copy the resources.
$(MAKE) install-global INSTALL_datadir=$(macosx_bundle_path)/Resources bindir=$(macosx_bundle_path)/MacOS
@@ -284,6 +316,7 @@ macosx-app: all
@echo "Have fun."
@echo ""
+.PHONY: macosx-standalone-app
macosx-standalone-app: macosx-app
# Create double clickable standalone (does not need fink) Mac OS X
# application. Not fully test, but should work on 10.5.
@@ -324,69 +357,13 @@ endef
@echo "Standalone Mac OS X application created."
@echo ""
+.PHONY: macosx-disk-image
macosx-disk-image: macosx-standalone-app
- /bin/rm -f ultrastardx.dmg
+ $(RM) ultrastardx.dmg
$(HDIUTIL) create -type SPARSE -size 30m -fs HFS+ -volname UltraStarDeluxe -ov -attach UltraStarDeluxe.sparseimage
/bin/cp -R ../UltraStarDeluxe.app /Volumes/UltraStarDeluxe
# /bin/cp ultrastardx/icons/UltraStarDeluxeVolumeIcon.icns /Volumes/UltraStarDeluxe/.VolumeIcon.icns
# /Developer/Tools/SetFile -a C /Volumes/UltraStarDeluxe/.VolumeIcon.icns /Volumes/UltraStarDeluxe
$(HDIUTIL) detach /Volumes/UltraStarDeluxe
$(HDIUTIL) convert UltraStarDeluxe.sparseimage -format UDBZ -o ultrastardx.dmg
- /bin/rm -f UltraStarDeluxe.sparseimage
-#################################################
-# clean-up
-#################################################
-
-clean: recursive-clean clean_obj
-
-recursive-clean: recursive-target = clean
-recursive-clean: recursive
-
-distclean: recursive-distclean clean clean_res
- find . -name "*.o" -o -name "*.ppu" -o -name "*.rst" -o -name "*.compiled" | xargs rm -f
- find . -name "*~" -name "*.bak" -o -name "*.orig" -o -name "*.dcu" | xargs rm -f
- find . -name "__history" | xargs rm -r -f
- rm -f "$(USDX_PREFIX).res" "$(USDX_PREFIX).identcache"
- rm -f config.inc Makefile config.log config.status configure aclocal.m4
- rm -rf autom4te.cache
-
-recursive-distclean: recursive-target = distclean
-recursive-distclean: recursive
-
-clean_obj:
- find "$(PCUNIT_DIR)" -name "*.o" -o -name "*.ppu" -o -name "*.rst" -o -name "*.compiled" | xargs rm -f
- rm -f "$(USDX_BIN)"
-
-#################################################
-# Resource-file
-#################################################
-
-$(RESOURCE_FILE): $(RC_FILE)
- $(RESEXTRACTOR_BIN) $(RC_FILE) $(RESOURCE_DIR) $(RESOURCE_FILE)
-
-clean_res:
- rm -f "$(RESOURCE_FILE)"
-
-#################################################
-# auto-update
-#################################################
-
-# FPC does not recognize changes correctly. E.g. sometimes changes in .inc-files or
-# conditional .pas dependencies are ignored which results in corrupted builds.
-# So check for changes with a modification timestamp.
-update-modfile:
- test -e $(modfile) || touch $(modfile)
- find . \( -name "*.pas" -o -name "*.pp" -o -name "*.inc" -o -name "*.dpr" \) -newer $(modfile) -exec touch $(modfile) \;
- find $(USDX_LIB_DIR) -name "*.a" -newer $(modfile) -exec touch $(modfile) \;
-
-Makefile: Makefile.in config.status
- ./config.status
-
-config.status: configure
- ./config.status --recheck
-
-configure: configure.ac config.inc.in aclocal.m4
- autoconf
-
-aclocal.m4: m4/*
- aclocal -I m4
+ $(RM) UltraStarDeluxe.sparseimage
diff --git a/src/configure.ac b/configure.ac
index 1152c1a1..a04d5a68 100644
--- a/src/configure.ac
+++ b/configure.ac
@@ -21,22 +21,14 @@ PACKAGE_IRC="#ultrastardx at quakenet.org"
AC_SUBST(PACKAGE_IRC)
# Specify a source-file so autoconf can check if the source-dir exists
-AC_CONFIG_SRCDIR(ultrastardx.dpr)
+AC_CONFIG_SRCDIR(src/ultrastardx.dpr)
-# This one is not used by autoconf at the moment.
-# When it is used maybe we don't need aclocal's -I parameter anymore.
-AC_CONFIG_MACRO_DIR(m4)
+# Set the path to install-sh
+AC_CONFIG_AUX_DIR(dists/autogen)
# show features and packages in one list
AC_PRESERVE_HELP_ORDER
-# set root directory (= trunk dir)
-# ..resolved: used by configure.ac
-usdxroot=..
-# ..unresolved: used by .in files
-usdxrootdir=\${top_srcdir}/..
-AC_SUBST(usdxrootdir)
-
# set sharerootdir to the resolved dataroot-dir for the config-*.inc file.
# Pascal cannot handle shell-variables like ${prefix}
AC_DEFINE_DIR(sharerootdir, datarootdir)
@@ -82,18 +74,6 @@ AC_DEFUN([AC_SUBST_DEFINE],
AC_SUBST(DEFINE_[$1])
])
-# AC_SUBST_COMMENT(DEFINE_SUFFIX, IS_ENABLED)
-# used to enable/disable lines in a Makefile
-AC_DEFUN([AC_SUBST_COMMENT],
-[
- if [[ x$2 = xyes ]]; then
- COMMENT_[$1]=""
- else
- COMMENT_[$1]="#"
- fi
- AC_SUBST(COMMENT_[$1])
-])
-
# AC_SPLIT_VERSION(VARIABLE_PREFIX, VERSION)
# Splits version number ("major.minor.release") into its components.
# Sets
@@ -278,22 +258,8 @@ AC_ARG_WITH([libprojectM],
[enable projectM visualization support @<:@default=no@:>@])],
[with_libprojectM=$withval], [with_libprojectM="no"])
-# print path options header
-AC_ARG_WITH([cfg-dummy2], [
-Additional directories:])
-
-# add suffix option
-AC_ARG_WITH([suffix],
- [AS_HELP_STRING([--with-suffix=SUFFIX],
- [path suffix @<:@default=ultrastardx@:>@])],
- [suffix=$withval], [suffix="ultrastardx"])
-if [[ x$suffix = xno -o x$suffix = xyes ]] ; then
- AC_MSG_ERROR([Invalid suffix.]);
-fi
-AC_SUBST(suffix)
-
# print misc options header
-AC_ARG_WITH([cfg-dummy3], [
+AC_ARG_WITH([cfg-dummy2], [
Development options:])
LOCAL_BUILD="no"
@@ -307,18 +273,9 @@ AC_ARG_ENABLE(global,
# add local option
AC_ARG_ENABLE(local,
[AS_HELP_STRING([--enable-local],
- [install into local folders (../...) (same as --disable-global) @<:@default=no@:>@]))],
+ [install into local folders (./game/...) (same as --disable-global) @<:@default=no@:>@]))],
[test $enableval = "yes" && LOCAL_BUILD="yes"], [])
-# add dev_layout option
-AC_ARG_ENABLE(dev-build,
- [AS_HELP_STRING([--enable-dev-build],
- [development build (implies local) @<:@default=no@:>@])],
- [enable_dev_build=$enableval], [enable_dev_build="no"])
-if [[ x$enable_dev_build = xyes ]]; then
- LOCAL_BUILD="yes"
-fi
-
# set default Makefile install-target according to local/global build-type
AC_SUBST_DEFINE(USE_LOCAL_DIRS, $LOCAL_BUILD)
if [[ x$LOCAL_BUILD = xyes ]]; then
@@ -332,6 +289,8 @@ fi
# check for compilers
# -----------------------------------------
+AC_CANONICAL_TARGET
+
# find and test the freepascal compiler
# sets PFLAGS, FPC_VERSION, FPC_DEBUG, etc.
AC_PROG_FPC
@@ -426,11 +385,11 @@ PKG_VALUE([libprojectM], [DATADIR], [variable=pkgdatadir], [$libprojectM_PKG],
[projectM data-directory for presets etc. (e.g. /usr/share/projectM)])
# check if we need the c-wrapper
if [[ "$libprojectM_VERSION_MAJOR" -ge 1 ]]; then
- libprojectM_NEEDS_CWRAPPER=yes
+ libprojectM_USE_CWRAPPER=yes
else
- libprojectM_NEEDS_CWRAPPER=no
+ libprojectM_USE_CWRAPPER=no
fi
-AC_SUBST_COMMENT(PROJECTM_CWRAPPER, $libprojectM_NEEDS_CWRAPPER)
+AC_SUBST(USE_PROJECTM_CWRAPPER, $libprojectM_USE_CWRAPPER)
# find portaudio
PKG_HAVE([portaudio], [portaudio-2.0], yes)
@@ -450,12 +409,13 @@ AC_SUBST(LIBS)
# create output files
# -----------------------------------------
-AC_CONFIG_FILES([config-$FPC_PLATFORM.inc:config.inc.in])
AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([$usdxroot/tools/ResourceExtractor/Makefile])
-if [[ x$libprojectM_NEEDS_CWRAPPER = xyes ]]; then
- AC_CONFIG_FILES([lib/projectM/cwrapper/Makefile])
+AC_CONFIG_FILES([src/Makefile])
+AC_CONFIG_FILES([src/config-$FPC_PLATFORM.inc:src/config.inc.in])
+if [[ x$libprojectM_USE_CWRAPPER = xyes ]]; then
+ AC_CONFIG_FILES([src/lib/projectM/cwrapper/Makefile])
fi
+AC_CONFIG_FILES([tools/ResourceExtractor/Makefile])
AC_OUTPUT
# -----------------------------------------
diff --git a/src/install-sh b/dists/autogen/install-sh
index a5897de6..a5897de6 100755
--- a/src/install-sh
+++ b/dists/autogen/install-sh
diff --git a/src/m4/ac_define_dir.m4 b/dists/autogen/m4/ac_define_dir.m4
index f3d8734f..f3d8734f 100644
--- a/src/m4/ac_define_dir.m4
+++ b/dists/autogen/m4/ac_define_dir.m4
diff --git a/src/m4/fpc.m4 b/dists/autogen/m4/fpc.m4
index 896c53d2..896c53d2 100644
--- a/src/m4/fpc.m4
+++ b/dists/autogen/m4/fpc.m4
diff --git a/src/autogen.sh b/src/autogen.sh
deleted file mode 100755
index 3f598d0b..00000000
--- a/src/autogen.sh
+++ /dev/null
@@ -1 +0,0 @@
-aclocal -I m4 && autoconf
diff --git a/src/build.bat b/src/build.bat
deleted file mode 100644
index 59f465d5..00000000
--- a/src/build.bat
+++ /dev/null
@@ -1,4 +0,0 @@
-C:\lazarus\fpc\2.0.4\bin\i386-win32\ppc386.exe -S2cgi -OG1 -gl -vewnhi -l -Filib\JEDI-SDLv1.0\SDL\Pas\ -Fu..\..\..\..\..\lazarus\components\jpeg\lib\i386-win32\ -Fu..\..\..\..\..\lazarus\components\images\lib\i386-win32\ -Fu..\..\..\..\..\lazarus\lcl\units\i386-win32\ -Fu..\..\..\..\..\lazarus\lcl\units\i386-win32\win32\ -Fu..\..\..\..\..\lazarus\packager\units\i386-win32\ -Fu. -oUltraStar.exe -dLCL -dLCLwin32 UltraStar.lpr
-rem C:\lazarus\fpc\2.0.4\bin\i386-win32\ppc386.exe -S2cgi -OG1 -gl -vewnhi -l -Filib\JEDI-SDLv1.0\SDL\Pas\ -Fu. -oUltraStar.exe UltraStar.lpr
-
-move UltraStar.exe ..\..\ \ No newline at end of file
diff --git a/src/lib/portaudio/delphi/portaudio.pas b/src/lib/portaudio/portaudio.pas
index f8c08bfd..f8c08bfd 100644
--- a/src/lib/portaudio/delphi/portaudio.pas
+++ b/src/lib/portaudio/portaudio.pas
diff --git a/src/lib/portmixer/delphi/portmixer.pas b/src/lib/portmixer/portmixer.pas
index d657cf85..d657cf85 100644
--- a/src/lib/portmixer/delphi/portmixer.pas
+++ b/src/lib/portmixer/portmixer.pas
diff --git a/src/lib/projectM/cwrapper/Makefile.in b/src/lib/projectM/cwrapper/Makefile.in
index d2be8613..fef3b80b 100644
--- a/src/lib/projectM/cwrapper/Makefile.in
+++ b/src/lib/projectM/cwrapper/Makefile.in
@@ -1,3 +1,13 @@
+#################################################
+# projectM C-wrapper
+# @configure_input@
+#################################################
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
OBJECTS = projectM-cwrapper.o
LIBRARY = libprojectM-cwrapper.a
@@ -28,3 +38,4 @@ distclean: clean
strip :
strip $(LIBRARY)
$(RANLIB) $(LIBRARY)
+
diff --git a/src/ultrastardx.dpr b/src/ultrastardx.dpr
index 8d9f952a..d9d380ab 100644
--- a/src/ultrastardx.dpr
+++ b/src/ultrastardx.dpr
@@ -58,11 +58,11 @@ uses
UAudioCore_Bass in 'classes\UAudioCore_Bass.pas',
{$ENDIF}
{$IFDEF UsePortaudio}
- portaudio in 'lib\portaudio\delphi\portaudio.pas',
+ portaudio in 'lib\portaudio\portaudio.pas',
UAudioCore_Portaudio in 'classes\UAudioCore_Portaudio.pas',
{$ENDIF}
{$IFDEF UsePortmixer}
- portmixer in 'lib\portmixer\delphi\portmixer.pas',
+ portmixer in 'lib\portmixer\portmixer.pas',
{$ENDIF}
{$IFDEF UseFFmpeg}
diff --git a/src/unit-tests/switches.inc b/test/switches.inc
index e69de29b..e69de29b 100644
--- a/src/unit-tests/switches.inc
+++ b/test/switches.inc
diff --git a/src/unit-tests/test_libraries.lpi b/test/test_libraries.lpi
index cc3a6ddf..cc3a6ddf 100644
--- a/src/unit-tests/test_libraries.lpi
+++ b/test/test_libraries.lpi
diff --git a/src/unit-tests/test_libraries.lpr b/test/test_libraries.lpr
index 3e3ae380..3e3ae380 100644
--- a/src/unit-tests/test_libraries.lpr
+++ b/test/test_libraries.lpr
diff --git a/src/unit-tests/testsqllite.pas b/test/testsqllite.pas
index b1b682d2..b1b682d2 100644
--- a/src/unit-tests/testsqllite.pas
+++ b/test/testsqllite.pas