source: to-imperative/trunk/runtime/Makefile @ 1434

Last change on this file since 1434 was 1434, checked in by orlov, 17 years ago
  • Improved makefiles.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.2 KB
Line 
1TOPDIR = ..
2
3include $(TOPDIR)/rules.mk
4
5RFRT_MODULES = \
6  rf_arg \
7  rf_common \
8  rf_core \
9  rf_expr \
10  rf_macros \
11  rf_result \
12  rf_retval \
13  rf_stack \
14  rf_term \
15  rf_memory_chunk \
16  rf_types \
17  rf_parenth \
18  rf_char \
19  rf_word \
20  rf_short_int \
21  rf_integer \
22  rf_func \
23  rf_object \
24  rf_object_ref \
25  rf_box \
26  rf_vector \
27  rf_string \
28  rf_channel \
29  rf_table
30
31RFRT_SOURCES = $(RFRT_MODULES:=.cc)
32RFRT_HEADERS = $(RFRT_MODULES:=.hh)
33RFRT_IHEADERS = $(RFRT_MODULES:=.ih)
34RFRT_OBJECTS = $(RFRT_MODULES:=.o)
35
36ALL_SOURCES = $(RFRT_SOURCES)
37
38DEPS = $(ALL_SOURCES:.cc=.dep)
39
40LIBRFRT = librfrt.a
41
42DISTFILES = Makefile
43DISTFILES += $(ALL_SOURCES)
44DISTFILES += $(RFRT_HEADERS)
45DISTFILES += $(RFRT_IHEADERS)
46
47all:: $(LIBRFRT)
48
49CPPFLAGS += -I$(TOPDIR)/libp++
50
51$(LIBRFRT): $(RFRT_OBJECTS)
52        ar cru $@ $^
53
54install:: all
55        mkdir -p -m 0755 $(INSTALL_DIR)/lib
56        install -m 0644 $(LIBRFRT) $(INSTALL_DIR)/lib/
57        mkdir -p -m 0755 $(INSTALL_DIR)/include/rfrt
58        $(foreach f, $(RFRT_HEADERS) $(RFRT_IHEADERS), \
59                [ -f $(f) ] && install -m 0644 $(f) $(INSTALL_DIR)/include/rfrt/ ; )
60
61uninstall:: all
62        { \
63        cd $(INSTALL_DIR)/lib \
64        rm $(LIBRFRT) \
65        }
66
67clean::
68        rm -f $(LIBRFRT) *.o *.dep
69
70-include $(DEPS)
Note: See TracBrowser for help on using the repository browser.