source: to-imperative/trunk/samples/Arithm/Makefile @ 594

Last change on this file since 594 was 594, checked in by luba, 18 years ago
  • Makefile for Arithm tests
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.0 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  add \
12  sub \
13  div \
14  rem \
15  div_rem \
16  mult \
17  gcd
18
19SAMPLES_SOURCES  = $(SAMPLES:=.cc)
20SAMPLES_SOURCES += $(SAMPLES:=.rf)
21DEPS = $(SAMPLES:=.dep)
22
23DISTFILES = Makefile
24DISTFILES += $(SAMPLES_SOURCES)
25
26all:: $(SAMPLES)
27
28RFPC = $(TOPDIR)/compiler/rfpc
29LIBRF = $(TOPDIR)/library/librf.a
30LIBRFRT = $(TOPDIR)/runtime/librfrt.a
31LIBPXX = $(TOPDIR)/libp++/libp++.a
32
33#$(SAMPLES): $(LIBRFRT)
34
35LDFLAGS += -L$(TOPDIR)/library -L$(TOPDIR)/runtime
36LDFLAGS += -L$(TOPDIR)/libp++ -L$(TOPDIR)/libstdc++-stub
37LDLIBS += -lrf -lrfrt -lp++ -lsupc++
38
39%.cc: %.rf
40        $(RFPC) -cc $<
41
42%.o: %.cc
43#       $(RFPC) -cc $<
44        $(CXX) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(<:.rf=.cc)
45
46$(SAMPLES): %: %.o $(LIBRF) $(LIBRFRT) $(LIBPXX)
47        $(CXX) -o $@ $< $(LDFLAGS) $(LDLIBS)
48       
49clean::
50        rm -f $(SAMPLES) *.o *.dep
51
52-include $(DEPS)
Note: See TracBrowser for help on using the repository browser.