TOPDIR = ../.. include $(TOPDIR)/rules.mk SUBDIRS = \ Access \ Apply \ Arithm \ ShortArithm \ Box \ Class \ Convert \ StdIO \ String \ Table \ Compare \ Dos \ Vector \ Bit RF_HEADERS = $(SUBDIRS:=.rfi) CPP_HEADERS = $(SUBDIRS:=.hh) CPP_HEADERS += $(foreach d, $(SUBDIRS), $(shell echo $(d) | tr A-Z a-z).hh) lists = $(addsuffix /module.list, $(SUBDIRS)) LIBRF = librf.a all:: $(LIBRF) $(LIBRF): $(lists) rm -rf $@ $(AR) cru $@ $(foreach dir, $(SUBDIRS), $(addprefix $(dir)/, $(shell cat $(dir)/module.list))) clean:: rm -rf $(LIBRF) install:: all mkdir -p -m 0755 $(INSTALL_DIR)/lib install -m 0644 $(LIBRF) $(INSTALL_DIR)/lib/ mkdir -p -m 0755 $(INSTALL_DIR)/include/refal-plus $(foreach f, $(RF_HEADERS), \ install -m 0644 include/refal-plus/$(f) \ $(INSTALL_DIR)/include/refal-plus/ ; \ ln -sf $(INSTALL_DIR)/include/refal-plus/$(f) \ $(INSTALL_DIR)/include/refal-plus/$(shell echo $(f) | tr A-Z a-z) ; ) mkdir -p -m 0755 $(INSTALL_DIR)/include/refal $(foreach f, $(CPP_HEADERS), \ install -m 0644 include/refal/$(f) \ $(INSTALL_DIR)/include/refal/ ; )