mirror of
https://github.com/chocolate-doom/launcher.git
synced 2024-11-13 00:24:38 +00:00
Add config.make containing package name parameters, and extend Makefile
to build a full application and .dmg file. Subversion-branch: /launcher Subversion-revision: 1777
This commit is contained in:
parent
5a3faa3eee
commit
f6010c7af5
2 changed files with 49 additions and 10 deletions
39
GNUmakefile
39
GNUmakefile
|
@ -1,20 +1,49 @@
|
||||||
|
|
||||||
|
include config.make
|
||||||
|
|
||||||
|
STAGING_DIR=staging
|
||||||
|
DMG=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).dmg
|
||||||
|
|
||||||
|
# DMG file containing package:
|
||||||
|
|
||||||
|
$(DMG) : $(STAGING_DIR)
|
||||||
|
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:
|
||||||
|
|
||||||
CFLAGS=-Wall
|
CFLAGS=-Wall
|
||||||
LDFLAGS=-framework Cocoa
|
LDFLAGS=-framework Cocoa
|
||||||
|
|
||||||
OBJS= AppController.o \
|
LAUNCHER_OBJS= \
|
||||||
|
AppController.o \
|
||||||
Execute.o \
|
Execute.o \
|
||||||
IWADController.o \
|
IWADController.o \
|
||||||
IWADLocation.o \
|
IWADLocation.o \
|
||||||
LauncherManager.o \
|
LauncherManager.o \
|
||||||
main.o
|
main.o
|
||||||
|
|
||||||
launcher : $(OBJS)
|
launcher : $(LAUNCHER_OBJS)
|
||||||
$(CC) $(LDFLAGS) $(OBJS) -o $@
|
$(CC) $(LDFLAGS) $(LAUNCHER_OBJS) -o $@
|
||||||
|
|
||||||
%.o : %.m
|
%.o : %.m
|
||||||
$(CC) -c $(CFLAGS) $^ -o $@
|
$(CC) -c $(CFLAGS) $^ -o $@
|
||||||
|
|
||||||
clean :
|
launcher_clean :
|
||||||
rm -f $(OBJS) launcher
|
rm -f $(LAUNCHER_OBJS) launcher
|
||||||
|
|
||||||
|
|
10
config.make
Normal file
10
config.make
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# File included by the main makefile that contains details
|
||||||
|
# about the package name. This will eventuall be generated
|
||||||
|
# by configure.
|
||||||
|
|
||||||
|
PACKAGE = cocoa-doom
|
||||||
|
PACKAGE_NAME = Cocoa Doom
|
||||||
|
PACKAGE_STRING = Cocoa Doom 1.2.1
|
||||||
|
PACKAGE_TARNAME = cocoa-doom
|
||||||
|
PACKAGE_VERSION = 1.2.1
|
||||||
|
|
Loading…
Reference in a new issue