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

Last change on this file since 1407 was 1407, checked in by orlov, 17 years ago
  • Improved makefiles.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 823 bytes
Line 
1CPPFLAGS += $(RFRTLIB_CFLAGS) $(RFLIB_CFLAGS)
2#CPPFLAGS += -DALL_INLINE #-DRFRT_DISABLE_TAIL_RECURSION
3#CFLAGS += -finline-limit=10000 -march=pentium3
4
5SAMPLES_SOURCES  = $(SAMPLES:=.cc)
6SAMPLES_SOURCES += $(SAMPLES:=.rf)
7
8DISTFILES = Makefile
9DISTFILES += $(SAMPLES_SOURCES)
10
11#$(SAMPLES): $(LIBRFRT)
12
13%.cc: %.rf $(RFPC)
14        $(RFPC) -cc $<
15
16%.hh: %.rfi
17        $(RFPC) $<
18
19%.o: %.cc %.rf
20#       $(RFPC) -cc $<
21        $(CXX) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(<:.rf=.cc)
22
23$(SAMPLES): %: %.o $(LIBRF) $(LIBRFRT) $(LIBPXX)
24        $(CXX) -o $@ $< $(RF_LDFLAGS) $(RF_LDLIBS)
25
26$(TESTS): %: %.o $(LIBRF) $(LIBRFRT) $(LIBPXX)
27        $(CXX) -o $@ $< $(RF_LDFLAGS) $(RF_LDLIBS)
28
29clean::
30        rm -f $(SAMPLES) $(TESTS) *.o *.dep
31
32check:: $(TESTS)
33        @$(foreach target,$(TESTS), \
34          $(TOPDIR)/samples/check.sh $(target) ; \
35        )
36
37DEPS = $(SAMPLES:=.dep)
38DEPS += $(TESTS:=.dep)
Note: See TracBrowser for help on using the repository browser.