Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 60 lines (45 sloc) 1.619 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
PLAT = /Developer/Platforms/iPhoneSimulator.platform
SDK = /Developer/SDKs/iPhoneSimulator5.0.sdk
PLATAPPS = $(PLAT)/Developer/Applications
OCAMLDIR = /usr/local/ocamlxsim
OCAMLBINDIR = $(OCAMLDIR)/bin/
CC = $(PLAT)/Developer/usr/bin/gcc
CFLAGS = -arch i386 -isysroot $(PLAT)$(SDK) -gdwarf-2 \
-D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 \
-isystem $(OCAMLDIR)/lib/ocaml -DCAML_NAME_SPACE
MFLAGS = -fobjc-legacy-dispatch -fobjc-abi-version=2
LDFLAGS = -Xlinker -objc_abi_version -Xlinker 2

MOBS = ViewDelegator.o wrap.o main.o
MLOBS = wrapper.cmx wrappee.cmx cocoa.cmx uiKit.cmx uiFont.cmx \
    uiBezierPath.cmx uiView.cmx uiActionSheet.cmx uiApplication.cmx \
    bzpdata.cmx bzpdraw.cmx colorfield.cmx vorocells.cmx voronoictlr.cmx

all: Voronoi Voronoi.nib Info.plist PkgInfo

Voronoi: $(MOBS) $(MLOBS)
$(OCAMLBINDIR)ocamlopt -cc '$(CC)' -ccopt '$(CFLAGS)' \
-cclib '$(LDFLAGS)' \
-o Voronoi \
$(MOBS) $(MLOBS) \
-cclib '-framework UIKit' \
-cclib '-framework Foundation'

execute: all
$(PLATAPPS)/iPhone\ Simulator.app/Contents/MacOS/iPhone\ Simulator \
-SimulateApplication Voronoi &

Voronoi.nib: Voronoi.xib
ibtool --compile Voronoi.nib Voronoi.xib


PkgInfo:
echo -n 'APPL????' > PkgInfo

clean:
rm -rf Voronoi Voronoi.nib PkgInfo build *.o *.cm[iox]

%.o: %.m
$(CC) $(CFLAGS) $(MFLAGS) -c $<

%.cmi: %.mli
$(OCAMLBINDIR)ocamlc -c $<

%.cmo: %.ml
$(OCAMLBINDIR)ocamlc -c $<

%.cmx: %.ml
$(OCAMLBINDIR)ocamlopt -cc '$(CC)' -ccopt '$(CFLAGS)' -c $<

depend::
$(OCAMLBINDIR)ocamldep *.ml *.mli > MLDepend
$(CC) $(CFLAGS) -MM *.m > MDepend

-include MLDepend
-include MDepend
Something went wrong with that request. Please try again.