Makefile.in 2.45 KB
Newer Older
pj2m's avatar
pj2m committed
1 2 3 4
include ../config/Makefile

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

bguillaum's avatar
New gui  
bguillaum committed
5
opt_gtk : dep2pict_glade.ml dep2pict_glade.cmx gui.cmx main.cmx ../bin/dep2pict.opt
pj2m's avatar
pj2m committed
6 7 8

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

bguillaum's avatar
New gui  
bguillaum committed
9 10 11 12 13 14
dep2pict_glade.ml : dep2pict.glade
	@echo "  ----> build file 'dep2pict_glade.ml' from 'dep2pict.glade'"
	lablgladecc2 dep2pict.glade > dep2pict_glade.ml
	@echo "  ----> set absolute file location in 'dep2pict_glade.ml' (DATA_DIR = $(DATA_DIR))"
	sed -i back 's|dep2pict.glade|$(DATA_DIR)dep2pict.glade|g' dep2pict_glade.ml
	rm -f dep2pict_glade.mlback
bguillaum's avatar
bguillaum committed
15

bguillaum's avatar
New gui  
bguillaum committed
16 17 18 19 20 21 22 23 24 25 26
# dep2pict_glade.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 > dep2pict_glade.ml
# 	rm dep2pict.glade.ml
# 	sed 's|dep2pict.glade.ml|$(DATA_DIR)dep2pict.glade|g' dep2pict_glade.ml > dep2pict_glade.tmp
#	mv dep2pict_glade.tmp dep2pict_glade.ml


dep2pict_glade.cmx : dep2pict_glade.ml
	$(OCAMLOPT) -c $(LABLGTK_OPT) $(CAIRO_OPT) dep2pict_glade.ml
bguillaum's avatar
bguillaum committed
27

28 29
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
30

bguillaum's avatar
New gui  
bguillaum committed
31 32
global.cmx : global.ml
	$(OCAMLOPT) -c -pp 'camlp4o pa_macro.cmo -DBUILD_GUI -DDATA_DIR=\"$(DATA_DIR)\" $(LOG) -DVERSION=\"$(VERSION)\"' $(DEP_OPT) global.ml
pj2m's avatar
pj2m committed
33

bguillaum's avatar
New gui  
bguillaum committed
34 35 36 37
gui.cmx : gui.ml global.cmx dep2pict_glade.cmx 
	$(OCAMLOPT) -c -pp 'camlp4o pa_macro.cmo -DBUILD_GUI -DDATA_DIR=\"$(DATA_DIR)\" $(LOG) -DVERSION=\"$(VERSION)\"' $(DEP_OPT) dep2pict_glade.cmx gui.ml

main.cmx : main.ml global.cmx
pj2m's avatar
pj2m committed
38
ifeq (@BUILD_GUI@,yes)
bguillaum's avatar
New gui  
bguillaum committed
39
	$(OCAMLOPT) -c -pp 'camlp4o pa_macro.cmo -DBUILD_GUI -DDATA_DIR=\"$(DATA_DIR)\" $(LOG) -DVERSION=\"$(VERSION)\"' $(DEP_OPT) dep2pict_glade.cmx global.cmx gui.cmx main.ml
pj2m's avatar
pj2m committed
40
else
bguillaum's avatar
New gui  
bguillaum committed
41
	$(OCAMLOPT) -c -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\" $(LOG) -DVERSION=\"$(VERSION)\"' $(DEP_OPT) global.cmx main.ml
pj2m's avatar
pj2m committed
42 43 44 45 46 47
endif


../bin/dep2pict.opt : main.cmx
	mkdir -p ../bin
ifeq (@BUILD_GUI@,yes)
bguillaum's avatar
New gui  
bguillaum committed
48
	$(OCAMLOPT) -o ../bin/dep2pict.opt -pp 'camlp4o pa_macro.cmo -DBUILD_GUI -DDATA_DIR=\"$(DATA_DIR)\" $(LOG) -DVERSION=\"$(VERSION)\"' $(DEP_OPT) dep2pict_glade.cmx global.cmx gui.cmx main.cmx
pj2m's avatar
pj2m committed
49
else
bguillaum's avatar
New gui  
bguillaum committed
50
	$(OCAMLOPT) -o ../bin/dep2pict.opt -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\" $(LOG) -DVERSION=\"$(VERSION)\"' $(DEP_OPT_NOGUI) global.cmx main.cmx
pj2m's avatar
pj2m committed
51
endif