source: to-imperative/trunk/library/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.1 KB
Line 
1TOPDIR = ..
2
3include $(TOPDIR)/rules.mk
4
5SUBDIRS = \
6  Access \
7  Apply \
8  Arithm \
9  ShortArithm \
10  Box \
11  Class \
12  Convert \
13  StdIO \
14  String \
15  Table \
16  Compare \
17  Dos \
18  Vector \
19  Bit
20
21RF_HEADERS = $(SUBDIRS:=.rfi)
22CPP_HEADERS = $(SUBDIRS:=.hh)
23CPP_HEADERS += $(foreach d, $(SUBDIRS), $(shell echo $(d) | tr A-Z a-z).hh)
24
25lists = $(addsuffix /module.list, $(SUBDIRS))
26
27LIBRF = librf.a
28
29all:: $(LIBRF)
30
31$(LIBRF): $(lists)
32        rm -rf $@
33        $(AR) cru $@ $(foreach dir, $(SUBDIRS), $(addprefix $(dir)/, $(shell cat $(dir)/module.list)))
34
35clean::
36        rm -rf $(LIBRF)
37
38install:: all
39        mkdir -p -m 0755 $(INSTALL_DIR)/lib
40        install -m 0644 $(LIBRF) $(INSTALL_DIR)/lib/
41        mkdir -p -m 0755 $(INSTALL_DIR)/include/refal-plus
42        $(foreach f, $(RF_HEADERS), \
43                install -m 0644 include/refal-plus/$(f) \
44                                $(INSTALL_DIR)/include/refal-plus/ ; \
45                ln -sf $(INSTALL_DIR)/include/refal-plus/$(f) \
46                       $(INSTALL_DIR)/include/refal-plus/$(shell echo $(f) | tr A-Z a-z) ; )
47        mkdir -p -m 0755 $(INSTALL_DIR)/include/refal
48        $(foreach f, $(CPP_HEADERS), \
49                install -m 0644 include/refal/$(f) \
50                                $(INSTALL_DIR)/include/refal/ ; )
51
Note: See TracBrowser for help on using the repository browser.