~jazzva/fakenes/ubuntu

« back to all changes in this revision

Viewing changes to build/mac/Rakefile

  • Committer: Sasa Bodiroza
  • Date: 2007-08-15 05:37:49 UTC
  • Revision ID: jazzva@gmail.com-20070815053749-76l0xj66tzgt290p
Upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#################
 
2
# Configuration #
 
3
#################
 
4
 
 
5
NAME = 'FakeNES'
 
6
require 'macsupport'
 
7
 
 
8
@systemFrameworks += %w(Cocoa)
 
9
@frameworks += %w(Allegro)
 
10
@linker = 'c++'
 
11
@commonflags += '-g -Os -DALLEGRO_NO_ASM -DPOSIX -DC99_TYPES -include config.h'
 
12
@cflags += '-Wno-pointer-sign'
 
13
@includes += '-I../../src/include -I../../src -I.'
 
14
 
 
15
####################
 
16
# Bundle structure #
 
17
####################
 
18
 
 
19
installTask(:setup, CONTENTSDIR, 'Info.plist')
 
20
installTask(:setup, RESOURCEDIR, 'FakeNES.icns')
 
21
task(:bundle => :setup)
 
22
 
 
23
installFrameworks(:frameworks)
 
24
task(:bundle => :frameworks)
 
25
 
 
26
##############
 
27
# App binary #
 
28
##############
 
29
 
 
30
sources = Dir::glob('../../src/**/*.c') + Dir::glob('../../src/**/*.cpp') + %w(datafile.c main.m)
 
31
 
 
32
buildBinary(:binary, BINDIR, 'fakenes', sources)
 
33
buildBinary(:binary, '.', 'dat2c', %w(../dat2c.c main.m))
 
34
 
 
35
file('datafile.c' => ['../../support/fakenes.dat', './dat2c']) do |t|
 
36
        sh('./dat2c -o datafile.c -h datafile.h -p datafile ../../support/fakenes.dat')
 
37
end
 
38
@cleanfiles += %w(datafile.c datafile.h)
 
39
 
 
40
task(:bundle => :binary)
 
41
 
 
42
################
 
43
# Main targets #
 
44
################
 
45
 
 
46
task(:default => :bundle)