TOPDIR = .. include $(TOPDIR)/rules.mk SUBDIRS = \ Access \ Apply \ Arithm \ ShortArithm \ MPArithm \ Bit \ Box \ Class \ Compare \ Convert \ CppMangle \ JavaMangle \ Debug \ Dir \ Dos \ Error \ File \ Lexer \ List \ RF_Stack \ Static \ StdIO \ Stream \ String \ System \ Table \ UniStd \ Vector RF_HEADERS = $(SUBDIRS:=.rfi) CPP_HEADERS = $(SUBDIRS:=.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/ ; ) mkdir -p -m 0755 $(INSTALL_DIR)/include/refal $(foreach f, $(CPP_HEADERS), \ install -m 0644 include/refal/$(f) \ $(INSTALL_DIR)/include/refal/ ; )