2009-12-25 00:42:51 +00:00
|
|
|
|
2010-01-04 15:12:58 +00:00
|
|
|
include config.make
|
|
|
|
|
|
|
|
STAGING_DIR=staging
|
|
|
|
DMG=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).dmg
|
|
|
|
|
|
|
|
# DMG file containing package:
|
|
|
|
|
|
|
|
$(DMG) : $(STAGING_DIR)
|
2010-01-04 15:34:00 +00:00
|
|
|
rm -f $@
|
2010-01-04 15:12:58 +00:00
|
|
|
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 launcher "$(APP_DIR)/Contents/MacOS/"
|
|
|
|
# TODO: copy Doom and setup binaries into app dir
|
|
|
|
# TODO: copy other documentation into staging dir
|
|
|
|
|
|
|
|
# Launcher build:
|
|
|
|
|
2010-01-04 14:40:03 +00:00
|
|
|
CFLAGS=-Wall
|
|
|
|
LDFLAGS=-framework Cocoa
|
2009-12-25 00:42:51 +00:00
|
|
|
|
2010-01-04 15:12:58 +00:00
|
|
|
LAUNCHER_OBJS= \
|
|
|
|
AppController.o \
|
|
|
|
Execute.o \
|
|
|
|
IWADController.o \
|
|
|
|
IWADLocation.o \
|
|
|
|
LauncherManager.o \
|
|
|
|
main.o
|
2009-12-25 00:42:51 +00:00
|
|
|
|
2010-01-04 15:12:58 +00:00
|
|
|
launcher : $(LAUNCHER_OBJS)
|
|
|
|
$(CC) $(LDFLAGS) $(LAUNCHER_OBJS) -o $@
|
2009-12-25 00:42:51 +00:00
|
|
|
|
2010-01-04 14:40:03 +00:00
|
|
|
%.o : %.m
|
|
|
|
$(CC) -c $(CFLAGS) $^ -o $@
|
2009-12-25 00:42:51 +00:00
|
|
|
|
2010-01-04 15:12:58 +00:00
|
|
|
launcher_clean :
|
|
|
|
rm -f $(LAUNCHER_OBJS) launcher
|
2009-12-25 00:42:51 +00:00
|
|
|
|