source: to-imperative/trunk/samples/samples.mk @ 1233

Last change on this file since 1233 was 1010, checked in by pooh, 17 years ago
  • More work on long arithmetic.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.1 KB
Line 
1CPPFLAGS += -I$(TOPDIR)/runtime -I$(TOPDIR)/libp++
2CPPFLAGS += -I$(TOPDIR)/library/include
3CPPFLAGS += -DALL_INLINE #-DRFRT_DISABLE_TAIL_RECURSION
4#CFLAGS += -finline-limit=10000 -march=pentium3
5
6SAMPLES_SOURCES  = $(SAMPLES:=.cc)
7SAMPLES_SOURCES += $(SAMPLES:=.rf)
8DEPS = $(SAMPLES:=.dep)
9
10DISTFILES = Makefile
11DISTFILES += $(SAMPLES_SOURCES)
12
13RFPC = $(TOPDIR)/compiler/rfpc
14LIBRF = $(TOPDIR)/library/librf.a
15LIBRFRT = $(TOPDIR)/runtime/librfrt.a
16LIBPXX = $(TOPDIR)/libp++/libp++.a
17
18#$(SAMPLES): $(LIBRFRT)
19
20LDFLAGS += -L$(TOPDIR)/library -L$(TOPDIR)/runtime
21LDFLAGS += -L$(TOPDIR)/libp++ -L$(TOPDIR)/libstdc++-stub
22LDLIBS += -lrf -lrfrt -lp++ -lsupc++ -lgmp
23
24%.cc: %.rf $(RFPC)
25        $(RFPC) -cc $<
26       
27%.hh: %.rfi
28        $(RFPC) $<
29
30%.o: %.cc %.rf
31#       $(RFPC) -cc $<
32        $(CXX) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(<:.rf=.cc)
33
34$(SAMPLES): %: %.o $(LIBRF) $(LIBRFRT) $(LIBPXX)
35        $(CXX) -o $@ $< $(LDFLAGS) $(LDLIBS)
36
37$(TESTS): %: %.o $(LIBRF) $(LIBRFRT) $(LIBPXX)
38        $(CXX) -o $@ $< $(LDFLAGS) $(LDLIBS)
39
40clean::
41        rm -f $(SAMPLES) $(TESTS) *.o *.dep
42
43check:: $(TESTS)
44        @$(foreach target,$(TESTS), \
45          $(TOPDIR)/samples/check.sh $(target) ; \
46        )
47
48DEPS = $(SAMPLES:=.dep)
49DEPS += $(TESTS:=.dep)
Note: See TracBrowser for help on using the repository browser.