Plasma GitLab Archive
Projects Blog Knowledge

# make all:             create application with bytecode compiler
# make opt:             create application with native compiler
# make clean: 		remove intermediate files
# make CLEAN:           remove intermediate files (recursively)
# make distclean: 	remove any superflous files
# make install		installs the created application
#----------------------------------------------------------------------

TOP = ..

.PHONY: all
all: symlinks
	rm -f depend
	$(MAKE) -f Makefile.code TARGET=byte wtimer.cgi wtimer.fcgi wtimer-admin

.PHONY: opt
opt: symlinks
	rm -f depend
	$(MAKE) -f Makefile.code TARGET=opt wtimer.cgi wtimer.fcgi wtimer-admin

.PHONY: clean
clean:
	rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa
	rm -f wtimer.ui.bin wtimer.cgi wtimerd wtimer-admin
	rm -f const.ml depend
	rm -f wd_application_2.dtd wtimer-static

.PHONY: install
install:
	mkdir -p $(INST_PREFIX)$(ETC_DIR)
	if [ -f "$(INST_PREFIX)$(ETC_DIR)/wtimer-config.xml" ]; then echo "Not overwriting wtimer-config.xml"; else cp wtimer-config.xml $(INST_PREFIX)$(ETC_DIR); fi
	mkdir -p $(INST_PREFIX)$(WTIMER_DIR)
	mkdir -p $(INST_PREFIX)$(WTIMERLIB_DIR)
	mkdir -p $(INST_PREFIX)$(UI_DIR)
	cp *.ui wef.dtd $(INST_PREFIX)$(UI_DIR)
	rm -f $(INST_PREFIX)$(UI_DIR)/wtimer-config.xml
	ln -s $(ETC_DIR)/wtimer-config.xml $(INST_PREFIX)$(UI_DIR)
	if [ -f wtimer.cgi ]; then mkdir -p $(INST_PREFIX)$(CGI_DIR) && cp wtimer.cgi $(INST_PREFIX)$(CGI_DIR); fi
	if [ -f wtimer.fcgi ]; then mkdir -p $(INST_PREFIX)$(CGI_DIR) && cp wtimer.fcgi $(INST_PREFIX)$(CGI_DIR); fi
	if [ -f wtimerd ]; then mkdir -p $(INST_PREFIX)$(SBIN_DIR) && cp wtimerd $(INST_PREFIX)$(SBIN_DIR); fi
	if [ -f wtimer-admin ]; then mkdir -p $(INST_PREFIX)$(BIN_DIR) && cp wtimer-admin $(INST_PREFIX)$(BIN_DIR); fi

.PHONY: symlinks
symlinks: wd_application_2.dtd wtimer-static

wd_application_2.dtd:
	ln -s `ocamlfind query wdialog`/wd_application_2.dtd .

# For development:
wtimer-static:
	ln -s ../static wtimer-static

include $(TOP)/Makefile.conf

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml