Makefile.in 1.69 KB
Newer Older
pj2m's avatar
pj2m committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
include ../config/Makefile

LOG = -DDEBUG=\"@DEBUG@\" -DINFO=\"@INFO@\" -DMESSAGE=\"@MESSAGE@\" -DWARNING=\"@WARNING@\"

opt_gtk : ui.ml ui.cmx gui.cmx main.cmx ../bin/dep2pict.opt

opt : main.cmx ../bin/dep2pict.opt

ui.ml : dep2pict.glade
	sed 's/<property name="invisible_char">&#x25CF;<\/property>//g' dep2pict.glade > glade.tmp
	mv glade.tmp dep2pict.glade.ml
	lablgladecc2 dep2pict.glade.ml > ui.ml
	rm dep2pict.glade.ml
	sed 's|dep2pict.glade.ml|$(DATA_DIR)dep2pict.glade|g' ui.ml > ui.tmp
	mv ui.tmp ui.ml
bguillaum's avatar
bguillaum committed
16

pj2m's avatar
pj2m committed
17
ui.cmx : ui.ml
18
	$(OCAMLOPT) -c $(LABLGTK_OPT) $(CAIRO_OPT) ui.ml
bguillaum's avatar
bguillaum committed
19

20 21
DEP_OPT= unix.cmxa str.cmxa bigarray.cmxa $(LABLGTK_OPT) $(CAIRO_OPT) $(XML_LIGHT_OPT) $(ANSITERMINAL_OPT) $(LOG_OPT) $(DEP2PICT_OPT) 
DEP_OPT_NOGUI= unix.cmxa str.cmxa bigarray.cmxa $(CAIRO_OPT) $(XML_LIGHT_OPT) $(ANSITERMINAL_OPT) $(LOG_OPT) $(DEP2PICT_OPT) 
pj2m's avatar
pj2m committed
22 23

gui.cmx : gui.ml ui.cmx 
bguillaum's avatar
bguillaum committed
24
	$(OCAMLOPT) -c -pp 'camlp4o pa_macro.cmo -DBUILD_GUI -DDATA_DIR=\"$(DATA_DIR)\" $(LOG) -DVERSION=\"$(VERSION)\"' $(DEP_OPT) ui.cmx gui.ml
pj2m's avatar
pj2m committed
25 26 27

main.cmx : main.ml
ifeq (@BUILD_GUI@,yes)
bguillaum's avatar
bguillaum committed
28
	$(OCAMLOPT) -c -pp 'camlp4o pa_macro.cmo -DBUILD_GUI -DDATA_DIR=\"$(DATA_DIR)\" $(LOG) -DVERSION=\"$(VERSION)\"' $(DEP_OPT) ui.cmx gui.cmx main.ml
pj2m's avatar
pj2m committed
29
else
bguillaum's avatar
bguillaum committed
30
	$(OCAMLOPT) -c -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\" $(LOG) -DVERSION=\"$(VERSION)\"' $(DEP_OPT) main.ml
pj2m's avatar
pj2m committed
31 32 33 34 35 36 37
endif



../bin/dep2pict.opt : main.cmx
	mkdir -p ../bin
ifeq (@BUILD_GUI@,yes)
bguillaum's avatar
bguillaum committed
38
	$(OCAMLOPT) -o ../bin/dep2pict.opt -pp 'camlp4o pa_macro.cmo -DBUILD_GUI -DDATA_DIR=\"$(DATA_DIR)\" $(LOG) -DVERSION=\"$(VERSION)\"' $(DEP_OPT) ui.cmx gui.cmx main.cmx
pj2m's avatar
pj2m committed
39
else
40
	$(OCAMLOPT) -o ../bin/dep2pict.opt -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\" $(LOG) -DVERSION=\"$(VERSION)\"' $(DEP_OPT_NOGUI) main.cmx
pj2m's avatar
pj2m committed
41
endif