makefile 1.79 KB
Newer Older
1

2
-include $(LURETTE_PATH)/Makefile.common.source
3

4

5
ifndef BIN_INSTALL_DIR 
6
  BIN_INSTALL_DIR := $(LURETTE_PATH)/$(HOST_TYPE)/bin
7 8
endif

9
ifeq ($(WIN32),cygwin)
10
  EXE = .exe
11 12 13
else
  EXE :=
endif
14

15 16 17
THREAD=
# THREAD=-thread threads.cma

18

19
xlurette_exe: dummy
20
	mlglade xlurette.glade
21 22
	mv xlurette_glade_interface.ml xlurette_glade_interface.ml0
	cat xlurette_glade_interface.ml0 \
23
	  | sed -e 's/\"pixmaps\//((Unix.getenv \"PIXMAP_DIR\") \^  \"/'  \
24 25
	  | sed -e 's/.xpm\"/.xpm\")/' \
	  > xlurette_glade_interface.ml
26 27
	ocamlc  -c -I +lablgtk -labels -c xlurette_glade_interface.ml
	ocamlc  -c -i -I +lablgtk -labels -c xlurette_glade_callbacks.ml
28
	ocamlc  -c -pp "camlp4o" -I +lablgtk $(THREAD) -c xlurette_glade_main.ml
29
	ocamlc $(THREAD) \
30
	   -I +lablgtk -I +str -o xlurette_exe$(EXE)  str.cma unix.cma  lablgtk.cma gtkInit.cmo  \
31 32
	   xlurette_glade_callbacks.cmo xlurette_glade_interface.cmo xlurette_glade_main.cmo

33
opt: dummy
34
	mlglade xlurette.glade
35 36
	mv xlurette_glade_interface.ml xlurette_glade_interface.ml0
	cat xlurette_glade_interface.ml0 \
37
	  | sed -e 's/\"pixmaps\//((Unix.getenv \"PIXMAP_DIR\") \^  \"/'  \
38 39
	  | sed -e 's/.xpm\"/.xpm\")/' \
	  > xlurette_glade_interface.ml
40 41 42 43
	ocamlopt  -verbose -c -I +lablgtk -labels -c xlurette_glade_interface.ml
	ocamlopt  -verbose -c -I +lablgtk -labels -c xlurette_glade_callbacks.ml
	ocamlopt  -verbose -c -pp "camlp4o" -I  +lablgtk $(THREAD) -c xlurette_glade_main.ml
	ocamlopt  -verbose -I +lablgtk -I +str -labels -o xlurette_exe$(EXE) str.cmxa unix.cmxa lablgtk.cmxa gtkInit.cmx  \
44 45 46
	   xlurette_glade_callbacks.cmx xlurette_glade_interface.cmx xlurette_glade_main.cmx


47 48


49
all: opt cp
50 51


52 53
cp: 
ifeq ($(HOST_TYPE),cygwin)
54
	cp xlurette_exe.exe $(BIN_INSTALL_DIR)
55
else
56
	cp xlurette_exe $(BIN_INSTALL_DIR)
57 58
endif

59
clean:
60
	rm -f *.cm* *.o a.out xlurette_exe$(EXE) xlurette_exe.opt$(EXE)
61 62 63 64
dummy: