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

Last change on this file since 770 was 713, checked in by orlov, 18 years ago
  • Auto-rebuild binaries when Refal source changes.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 911 bytes
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
13all:: $(SAMPLES)
14
15RFPC = $(TOPDIR)/compiler/rfpc
16LIBRF = $(TOPDIR)/library/librf.a
17LIBRFRT = $(TOPDIR)/runtime/librfrt.a
18LIBPXX = $(TOPDIR)/libp++/libp++.a
19
20#$(SAMPLES): $(LIBRFRT)
21
22LDFLAGS += -L$(TOPDIR)/library -L$(TOPDIR)/runtime
23LDFLAGS += -L$(TOPDIR)/libp++ -L$(TOPDIR)/libstdc++-stub
24LDLIBS += -lrf -lrfrt -lp++ -lsupc++
25
26%.cc: %.rf
27        $(RFPC) -cc $<
28
29%.o: %.cc %.rf
30#       $(RFPC) -cc $<
31        $(CXX) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(<:.rf=.cc)
32
33$(SAMPLES): %: %.o $(LIBRF) $(LIBRFRT) $(LIBPXX)
34        $(CXX) -o $@ $< $(LDFLAGS) $(LDLIBS)
35
36clean::
37        rm -f $(SAMPLES) *.o *.dep
38
Note: See TracBrowser for help on using the repository browser.