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

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