TOPDIR = .. include $(TOPDIR)/rules.mk RFRT_MODULES = \ rf_arg \ rf_atstart \ rf_common \ rf_core \ rf_expr \ rf_macros \ rf_result \ rf_retval \ rf_stack \ rf_term \ rf_memory_chunk \ rf_types \ rf_func \ rf_char \ rf_word \ rf_short_int \ rf_integer \ rf_mpint \ rf_object \ rf_static_object \ rf_object_ref \ rf_vector \ rf_string \ rf_channel \ rf_table RFRT_SOURCES = $(RFRT_MODULES:=.cc) RFRT_IHEADERS = $(RFRT_MODULES:=.ih) rf_symbol.ih rf_closure.ih RFRT_HEADERS = $(RFRT_IHEADERS:.ih=.hh) rf_expr_constr.hh rf_box.hh rf_parenth.hh rf_sysdefs.hh RFRT_OBJECTS = $(RFRT_MODULES:=.o) ALL_SOURCES = $(RFRT_SOURCES) DEPS = $(ALL_SOURCES:.cc=.dep) LIBRFRT = librfrt.a DISTFILES = Makefile DISTFILES += $(ALL_SOURCES) DISTFILES += $(RFRT_HEADERS) DISTFILES += $(RFRT_IHEADERS) all:: $(LIBRFRT) CPPFLAGS += $(RFRTLIB_CFLAGS) $(RFLIB_CFLAGS) $(LIBRFRT): $(RFRT_OBJECTS) ar cru $@ $^ install:: all mkdir -p -m 0755 $(INSTALL_DIR)/lib install -m 0644 $(LIBRFRT) $(INSTALL_DIR)/lib/ mkdir -p -m 0755 $(INSTALL_DIR)/include/rfrt $(foreach f, $(RFRT_HEADERS) $(RFRT_IHEADERS), \ [ -f $(f) ] && install -m 0644 $(f) $(INSTALL_DIR)/include/rfrt/ ; ) uninstall:: all { \ cd $(INSTALL_DIR)/lib \ rm $(LIBRFRT) \ } clean:: rm -f $(LIBRFRT) *.o *.dep -include $(DEPS)