source: to-imperative/trunk/samples/Makefile @ 693

Last change on this file since 693 was 693, checked in by orlov, 18 years ago
  • Added Arithm and Syntax subdirectories.
  • 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
5CPPFLAGS += -I$(TOPDIR)/runtime -I$(TOPDIR)/libp++
6CPPFLAGS += -I$(TOPDIR)/library/include
7CPPFLAGS += -DALL_INLINE #-DRFRT_DISABLE_TAIL_RECURSION
8#CFLAGS += -finline-limit=10000 -march=pentium3
9
10SAMPLES = \
11  hello \
12  perm \
13  select \
14  select1 \
15  select2 \
16  select3
17
18SUBDIRS = \
19  Access \
20  Arithm \
21  Convert \
22  Syntax
23
24SAMPLES_SOURCES  = $(SAMPLES:=.cc)
25SAMPLES_SOURCES += $(SAMPLES:=.rf)
26DEPS = $(SAMPLES:=.dep)
27
28DISTFILES = Makefile
29DISTFILES += $(SAMPLES_SOURCES)
30
31all:: $(SAMPLES)
32
33RFPC = $(TOPDIR)/compiler/rfpc
34LIBRF = $(TOPDIR)/library/librf.a
35LIBRFRT = $(TOPDIR)/runtime/librfrt.a
36LIBPXX = $(TOPDIR)/libp++/libp++.a
37
38#$(SAMPLES): $(LIBRFRT)
39
40LDFLAGS += -L$(TOPDIR)/library -L$(TOPDIR)/runtime
41LDFLAGS += -L$(TOPDIR)/libp++ -L$(TOPDIR)/libstdc++-stub
42LDLIBS += -lrf -lrfrt -lp++ -lsupc++
43
44%.cc: %.rf
45        $(RFPC) -cc $<
46
47%.o: %.cc
48#       $(RFPC) -cc $<
49        $(CXX) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(<:.rf=.cc)
50
51$(SAMPLES): %: %.o $(LIBRF) $(LIBRFRT) $(LIBPXX)
52        $(CXX) -o $@ $< $(LDFLAGS) $(LDLIBS)
53
54clean::
55        rm -f $(SAMPLES) *.o *.dep
56
57-include $(DEPS)
Note: See TracBrowser for help on using the repository browser.