-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.in
54 lines (40 loc) · 1.66 KB
/
Makefile.in
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
OCAMLFIND := @OCAMLFIND@
.DEFAULT_GOAL:=all
VPATH:=src
MLIFILES=$(wildcard src/*.mli)
include src/Makefile
.PHONY: clean distclean all install lablgtkosx-@[email protected]
example/example.native: @[email protected] example/example.ml
cd $(dir $@) && \
@OCAMLBUILD@ -use-ocamlfind -package @OCAML_PKG_lablgtk2@ -lib \
$(shell pwd)/$(basename $<) -lflags -cclib,-L$(shell pwd) -cflags \
-I,$(shell pwd)/src $(notdir $@)
example/example.app: example/example.native example/Info.plist
rm -rf $@
mkdir -p $@/Contents/MacOS
cp example/example.native $@/Contents/MacOS
cp example/Info.plist $@/Contents
codesign -s - $@
install:
$(OCAMLFIND) install @PACKAGE_NAME@ META $(wildcard src/*.cmi) $(MLIFILES) \
lib@[email protected] @PACKAGE_NAME@.{,cm{,x}}a dll@[email protected]
all: @[email protected] @[email protected] example/example.app
html: $(wildcard src/*.mli) $(wildcard src/*Enums.ml) | @[email protected]
rm -rf html && mkdir html
$(OCAMLFIND) ocamldoc -I src -package @OCAML_PKG_lablgtk2@ -d $@ -html $^
clean:
find . -name \*~ -delete
cd src && rm -f *_tags.{c,h} *.o *Props.ml{,.old} *.cm{i,o,x} *Enums.ml
rm -f depends *.o *.{cm{x,},}a *.so
cd example && @OCAMLBUILD@ -clean; rm -f example.native
rm -rf example/example.app
rm -rf html
distclean:
rm -f META {,src/}Makefile example/Info.plist config.{log,status}
find . -name .DS_Store -delete
DISTRDIR:=$(shell mktemp -d -t lablosx)
lablgtkosx-@[email protected]:
cp -R ./ $(DISTRDIR)/$(basename $(basename $@))
+$(MAKE) -C$(DISTRDIR)/$(basename $(basename $@)) clean distclean
cd $(DISTRDIR)/$(basename $(basename $@)) && rm -rf .git*
tar -C $(DISTRDIR) -cjf $@ $(basename $(basename $@))