3 INCLUDEDIR = @OCAML_INCLUDE_DIR@
4 PROPCC = @OCAML_LIB_DIR@/lablgtk2/propcc
7 C_OBJECTS = ml_gtk_sourceview.o
9 gtkSourceViewProps.cmo \
10 ogtkSourceViewProps.cmo \
15 ML_OBJECTS_OPT = $(patsubst %.cmo,%.cmx,$(ML_OBJECTS))
16 GENERATED_FILES = gtkSourceViewProps.ml ogtkSourceViewProps.ml
38 DIST_DIR = $(PACKAGE)-$(VERSION)
39 EXTRA_DIST = ACKNOWLEDGEMENTS AUTHORS CHANGES COPYING LICENSE NEWS README
41 SHARED_LIBS = @GTKSOURCEVIEW_LIBS@
43 OCAMLC = $(OCAMLFIND) ocamlc -package "$(REQUIRES)"
44 OCAMLOPT = $(OCAMLFIND) ocamlopt -package "$(REQUIRES)"
46 OCAMLMKLIB = ocamlmklib
47 OCAML_STUB_DIR = @OCAML_STUB_DIR@
49 DLL = dll$(ARCHIVE).so
50 NATIVE = @HAVE_OCAMLOPT@
52 BYTE_INST = $(ARCHIVE).cma lib$(ARCHIVE).a $(C_OBJECTS) $(DLL)
53 OPT_INST = $(BYTE_INST) $(ARCHIVE).cmxa $(ARCHIVE).a
61 all: $(ARCHIVE).cma lib$(ARCHIVE).a $(DLL) $(TESTDIR)/test
62 opt: $(ARCHIVE).cmxa $(ARCHIVE).a $(TESTDIR)/test.opt
65 $(MAKE) -C $(TESTDIR) test.opt
67 $(MAKE) -C $(TESTDIR) test
72 cp -a $(DIST_FILES) $(EXTRA_DIST) $(DIST_DIR)/
73 -find $(DIST_DIR) -name CVS -type d -exec rm -rf {} \;
74 -find $(DIST_DIR) -name .cvsignore -type f -exec rm {} \;
75 tar cvfz $(DIST_DIR).tar.gz $(DIST_DIR)/
80 tar xvzf $(DIST_DIR).tar.gz
81 (cd $(DIST_DIR)/ && debuild)
84 ml_gtk_sourceview.o: ml_gtk_sourceview.c
85 gcc -c -I$(INCLUDEDIR) -fPIC `$(OCAMLFIND) query -i-format lablgtk2` @GTKSOURCEVIEW_CFLAGS@ $<
94 $(GENERATED_FILES): gtkSourceView.props
95 %Props.ml o%Props.ml: %.props
98 depend: *.ml *.mli $(GENERATED_FILES)
99 $(OCAMLDEP) *.ml *.mli >.depend
102 $(ARCHIVE).cma: $(ML_OBJECTS)
103 $(OCAMLMKLIB) -o $(ARCHIVE) $^ $(SHARED_LIBS)
104 $(ARCHIVE).cmxa: $(ML_OBJECTS_OPT)
105 $(OCAMLMKLIB) -o $(ARCHIVE) $^ $(SHARED_LIBS)
106 lib$(ARCHIVE).a $(DLL): $(C_OBJECTS)
107 $(OCAMLMKLIB) -o $(ARCHIVE) $^ $(SHARED_LIBS)
110 INSTALLER = $(OCAMLFIND) install -ldconf /dev/null
111 UNINSTALLER = $(OCAMLFIND) remove -ldconf /dev/null
113 INSTALLER = $(OCAMLFIND) install -destdir $(DESTDIR) -ldconf /dev/null
114 UNINSTALLER = $(OCAMLFIND) remove -destdir $(DESTDIR) -ldconf /dev/null
115 install: world installmkdir
119 install: installworld
125 $(INSTALLER) $(PACKAGE) $(BYTE_INST) $(EXTRA_INST)
127 $(INSTALLER) $(PACKAGE) $(OPT_INST) $(EXTRA_INST)
133 $(UNINSTALLER) $(PACKAGE)
136 rm -f *.[ao] *.cm[iaxo] *.cmxa *.so $(GENERATED_FILES)
137 make -C $(TESTDIR) clean
140 rm -f config.log config.cache config.status Makefile META
141 make -C $(TESTDIR) distclean
143 .PHONY: world uninstall clean distclean test/test test/test.opt
144 .PHONY: install installmkdir installbyte installworld