summaryrefslogtreecommitdiff
path: root/pkg/osx/GNUmakefile
diff options
context:
space:
mode:
authorSimon Howard2010-01-04 22:01:32 +0000
committerSimon Howard2010-01-04 22:01:32 +0000
commit6921f30a44e0bdf1c3a2f8982e4a8cd290c22462 (patch)
treee597201e79368095e58e7ea753eea76906db1c03 /pkg/osx/GNUmakefile
parent9b0b0629e02deba1788d4a4e190b31977f7c0b1f (diff)
downloadchocolate-doom-6921f30a44e0bdf1c3a2f8982e4a8cd290c22462.tar.gz
chocolate-doom-6921f30a44e0bdf1c3a2f8982e4a8cd290c22462.tar.bz2
chocolate-doom-6921f30a44e0bdf1c3a2f8982e4a8cd290c22462.zip
Import OS X launcher code to trunk.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1784
Diffstat (limited to 'pkg/osx/GNUmakefile')
-rw-r--r--pkg/osx/GNUmakefile52
1 files changed, 52 insertions, 0 deletions
diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile
new file mode 100644
index 00000000..8d89ef50
--- /dev/null
+++ b/pkg/osx/GNUmakefile
@@ -0,0 +1,52 @@
+
+include config.make
+
+STAGING_DIR=staging
+DMG=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).dmg
+
+# DMG file containing package:
+
+$(DMG) : $(STAGING_DIR)
+ rm -f $@
+ hdiutil create -volname "$(PACKAGE_STRING)" -srcdir $(STAGING_DIR) $@
+
+clean : launcher_clean
+ rm -f $(DMG)
+ rm -rf $(STAGING_DIR)
+
+# Staging dir build for package:
+
+APP_DIR=$(STAGING_DIR)/$(PACKAGE_NAME).app
+
+$(STAGING_DIR): launcher
+ rm -rf $(STAGING_DIR)
+ mkdir $(STAGING_DIR)
+ cp -R app-skeleton "$(APP_DIR)"
+ cp Info.plist "$(APP_DIR)/Contents/"
+ cp launcher "$(APP_DIR)/Contents/MacOS/"
+ # TODO: copy Doom and setup binaries into app dir
+ # TODO: copy other documentation into staging dir
+ find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \;
+
+# Launcher build:
+
+CFLAGS=-Wall
+LDFLAGS=-framework Cocoa
+
+LAUNCHER_OBJS= \
+ AppController.o \
+ Execute.o \
+ IWADController.o \
+ IWADLocation.o \
+ LauncherManager.o \
+ main.o
+
+launcher : $(LAUNCHER_OBJS)
+ $(CC) $(LDFLAGS) $(LAUNCHER_OBJS) -o $@
+
+%.o : %.m
+ $(CC) -c $(CFLAGS) $^ -o $@
+
+launcher_clean :
+ rm -f $(LAUNCHER_OBJS) launcher
+