summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.in4
-rw-r--r--pkg/.gitignore3
-rw-r--r--pkg/Makefile.am28
-rw-r--r--pkg/config.make.in19
-rw-r--r--pkg/osx/.gitignore5
-rw-r--r--pkg/osx/GNUmakefile24
-rw-r--r--pkg/osx/config.make.in9
-rw-r--r--pkg/win32/GNUmakefile (renamed from pkg/win32/GNUmakefile.am)17
-rw-r--r--pkg/wince/GNUmakefile (renamed from pkg/wince/GNUmakefile.am)8
-rw-r--r--wince/.gitignore3
11 files changed, 77 insertions, 45 deletions
diff --git a/Makefile.am b/Makefile.am
index 906bc76a..662e26bb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,6 +53,8 @@ DIST_SUBDIRS=pkg $(SUBDIRS)
if HAVE_PYTHON
+noinst_DATA=CMDLINE
+
CMDLINE : src/
./man/docgen -p man/CMDLINE.template src/ > $@
diff --git a/configure.in b/configure.in
index 9e95c0f1..8167462e 100644
--- a/configure.in
+++ b/configure.in
@@ -123,9 +123,7 @@ man/Makefile
src/Makefile
pcsound/Makefile
pkg/Makefile
-pkg/wince/GNUmakefile
-pkg/win32/GNUmakefile
-pkg/osx/config.make
+pkg/config.make
pkg/osx/Info.plist
src/resource.rc
src/doom-screensaver.desktop
diff --git a/pkg/.gitignore b/pkg/.gitignore
new file mode 100644
index 00000000..a1dd1cde
--- /dev/null
+++ b/pkg/.gitignore
@@ -0,0 +1,3 @@
+Makefile
+Makefile.in
+config.make
diff --git a/pkg/Makefile.am b/pkg/Makefile.am
index 66cb9ba0..9a607ee8 100644
--- a/pkg/Makefile.am
+++ b/pkg/Makefile.am
@@ -1,3 +1,29 @@
-DIST_SUBDIRS=wince win32
+OSX_FILES= \
+osx/app-skeleton/Contents/PkgInfo \
+osx/app-skeleton/Contents/Resources/128x128.png \
+osx/app-skeleton/Contents/Resources/app.icns \
+osx/app-skeleton/Contents/Resources/launcher.nib/classes.nib \
+osx/app-skeleton/Contents/Resources/launcher.nib/info.nib \
+osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib \
+osx/GNUmakefile \
+osx/Info.plist.in \
+osx/cp-with-libs \
+osx/main.m \
+osx/AppController.m osx/AppController.h \
+osx/Execute.m osx/Execute.h \
+osx/IWADController.m osx/IWADController.h \
+osx/IWADLocation.m osx/IWADLocation.h \
+osx/LauncherManager.m osx/LauncherManager.h
+
+WINCE_FILES= \
+wince/GNUmakefile \
+wince/wince-cab.cfg \
+wince/wince-cabgen
+
+WIN32_FILES= \
+win32/GNUmakefile \
+win32/README
+
+EXTRA_DIST=$(OSX_FILES) $(WINCE_FILES) $(WIN32_FILES)
diff --git a/pkg/config.make.in b/pkg/config.make.in
new file mode 100644
index 00000000..caedab23
--- /dev/null
+++ b/pkg/config.make.in
@@ -0,0 +1,19 @@
+# File included by package makefiles that contains details
+# about the package name, generated by configure.
+
+PACKAGE = @PACKAGE@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+
+# Documentation files to distribute with packages.
+
+DOC_FILES=README \
+ COPYING \
+ ChangeLog \
+ NEWS \
+ BUGS \
+ CMDLINE \
+ TODO
+
diff --git a/pkg/osx/.gitignore b/pkg/osx/.gitignore
new file mode 100644
index 00000000..5b7a16ef
--- /dev/null
+++ b/pkg/osx/.gitignore
@@ -0,0 +1,5 @@
+Info.plist
+launcher
+*.o
+*.d
+staging
diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile
index b060f483..92fc5b0f 100644
--- a/pkg/osx/GNUmakefile
+++ b/pkg/osx/GNUmakefile
@@ -1,19 +1,14 @@
-include config.make
+include ../config.make
CC=gcc
STRIP=strip
STAGING_DIR=staging
DMG=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).dmg
-DOC_FILES=\
- README \
- COPYING \
- ChangeLog \
- NEWS \
- BUGS \
- CMDLINE \
- TODO
+
+TOPLEVEL=../..
+TOPLEVEL_DOCS=$(patsubst %,../../%,$(DOC_FILES))
ifndef GNUSTEP_MAKEFILES
@@ -30,20 +25,21 @@ endif
APP_DIR=$(STAGING_DIR)/$(PACKAGE_NAME).app
APP_BIN_DIR=$(APP_DIR)/Contents/MacOS/
-$(STAGING_DIR): launcher
+$(STAGING_DIR): launcher $(TOPLEVEL_DOCS)
rm -rf $(STAGING_DIR)
mkdir $(STAGING_DIR)
cp -R app-skeleton "$(APP_DIR)"
+ mkdir "$(APP_BIN_DIR)"
cp Info.plist "$(APP_DIR)/Contents/"
cp launcher "$(APP_BIN_DIR)/"
- ./cp-with-libs ../../src/chocolate-doom "$(APP_BIN_DIR)"
+ ./cp-with-libs $(TOPLEVEL)/src/chocolate-doom "$(APP_BIN_DIR)"
$(STRIP) "$(APP_BIN_DIR)/chocolate-doom"
- ./cp-with-libs ../../setup/chocolate-setup "$(APP_BIN_DIR)"
+ ./cp-with-libs $(TOPLEVEL)/setup/chocolate-setup "$(APP_BIN_DIR)"
$(STRIP) "$(APP_BIN_DIR)/chocolate-setup"
- for d in $(DOC_FILES); do cp ../../$$d $(STAGING_DIR)/; done
+ for d in $(DOC_FILES); do cp $(TOPLEVEL)/$$d $(STAGING_DIR)/; done
find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \; || true
@@ -53,7 +49,7 @@ clean : launcher_clean
# Launcher build:
-CFLAGS = -Wall -I../..
+CFLAGS = -Wall -I$(TOPLEVEL)
# Are we building using gs_make?
diff --git a/pkg/osx/config.make.in b/pkg/osx/config.make.in
deleted file mode 100644
index 67f1c968..00000000
--- a/pkg/osx/config.make.in
+++ /dev/null
@@ -1,9 +0,0 @@
-# File included by the main makefile that contains details
-# about the package name, generated by configure.
-
-PACKAGE = @PACKAGE@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-
diff --git a/pkg/win32/GNUmakefile.am b/pkg/win32/GNUmakefile
index ed86d2cc..93c6abe1 100644
--- a/pkg/win32/GNUmakefile.am
+++ b/pkg/win32/GNUmakefile
@@ -1,7 +1,9 @@
+include ../config.make
+
TOPLEVEL=../..
-EXE_FILES=$(TOPLEVEL)/src/@PACKAGE_TARNAME@.exe \
+EXE_FILES=$(TOPLEVEL)/src/$(PACKAGE_TARNAME).exe \
$(TOPLEVEL)/src/chocolate-server.exe \
$(TOPLEVEL)/setup/chocolate-setup.exe
@@ -9,18 +11,7 @@ DLL_FILES=$(TOPLEVEL)/src/SDL.dll \
$(TOPLEVEL)/src/SDL_mixer.dll \
$(TOPLEVEL)/src/SDL_net.dll
-DOC_FILES=README \
- COPYING \
- ChangeLog \
- NEWS \
- BUGS \
- CMDLINE \
- TODO
-
-EXTRA_DIST=README
-noinst_DATA=@PACKAGE_TARNAME@-@PACKAGE_VERSION@-win32.zip
-
-@PACKAGE_TARNAME@-@PACKAGE_VERSION@-win32.zip : staging
+$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-win32.zip : staging
zip -j -r $@ staging/
staging: $(EXE_FILES) $(DLL_FILES) $(patsubst %,../../%,$(DOC_FILES))
diff --git a/pkg/wince/GNUmakefile.am b/pkg/wince/GNUmakefile
index e710e679..073346d7 100644
--- a/pkg/wince/GNUmakefile.am
+++ b/pkg/wince/GNUmakefile
@@ -1,11 +1,9 @@
+include ../config.make
+
DEPS=$(shell ./wince-cabgen -d $(CONFIG_FILE))
CONFIG_FILE=wince-cab.cfg
-OUTPUT_FILE=@PACKAGE_TARNAME@-@PACKAGE_VERSION@.cab
-
-EXTRA_DIST=wince-cabgen $(CONFIG_FILE)
-
-noinst_DATA = $(OUTPUT_FILE)
+OUTPUT_FILE=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).cab
$(OUTPUT_FILE) : $(CONFIG_FILE) $(DEPS)
./wince-cabgen $< $@
diff --git a/wince/.gitignore b/wince/.gitignore
new file mode 100644
index 00000000..051d1bd5
--- /dev/null
+++ b/wince/.gitignore
@@ -0,0 +1,3 @@
+Makefile
+Makefile.in
+.deps