1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
include ../../Makefile.template
INCLUDES = -I unix -I ..
BACKEND = process
AUXMOD = libext libextunix
AUXMODBYT = $(AUXMOD:%=%.cmo)
ifeq ($(NATIVE),yes)
AUXMODNAT = $(AUXMOD:%=%.cmx)
endif
LOCALMOD = coordinator
COMMONMOD = mutex condition event cothread stm
ifeq ($(NATIVE),yes)
COMMONMODNAT = $(COMMONMOD:%=%.cmx)
endif
COMMONMODINTFSRC = $(COMMONMOD:%=%.mli)
COMMONMODINTFCOM = $(COMMONMOD:%=%.cmi)
COMMONMODINTF = $(COMMONMODINTFSRC) $(COMMONMODINTFCOM)
EXTRAMOD = thread
ifeq ($(NATIVE),yes)
EXTRAMODNAT =$(EXTRAMOD:%=%.cmx)
endif
EXTRAMODINTFCOM = $(EXTRAMOD:%=%.cmi)
ALLMOD = $(LOCALMOD) $(COMMONMOD) $(EXTRAMOD)
ALLMODBYT = $(ALLMOD:%=%.cmo)
ifeq ($(NATIVE),yes)
ALLMODNAT = $(ALLMOD:%=%.cmx)
endif
LIB = threads cothreads
LIBBYT = $(LIB:%=%.cma)
ifeq ($(NATIVE),yes)
LIBNAT = $(LIB:%=%.cmxa)
LIBNATA = $(LIB:%=%.a)
endif
INSTALLDIR = $(INSTALLLIBDIR)/$(BACKEND)
INSTALLFILES = $(COMMONMODINTFCOM) $(EXTRAMODINTFCOM) $(COMMONMODNAT) $(EXTRAMODNAT) $(LIBBYT) $(LIBNAT) $(LIBNATA)
$(LIBBYT): %: $(ALLMODBYT)
$(OCAMLC) -a -o $@ $(AUXMODBYT) $(ALLMODBYT)
$(LIBNAT): %: $(ALLMODNAT)
$(OCAMLOPT) -a -o $@ $(AUXMODNAT) $(ALLMODNAT)
$(COMMONMODINTF): %: ../%
@if [ ! -e $@ -a -e $< ]; then ln -s $< .; fi
.PHONY: all install clean uninstall
all: $(COMMONMODINTF) $(LIBBYT) $(LIBNAT)
install: all
$(MKDIR) $(INSTALLDIR)
$(CP) $(INSTALLFILES) $(INSTALLDIR)
clean: ocamlclean
uninstall:
$(RM) $(INSTALLDIR)
|