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

Last change on this file since 1414 was 1414, 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: 908 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
8SAMPLES_EXE = $(SAMPLES:=$(EXE_SUFFIX))
9TESTS_EXE = $(TESTS:=$(EXE_SUFFIX))
10
11DISTFILES = Makefile
12DISTFILES += $(SAMPLES_SOURCES)
13
14#$(SAMPLES): $(LIBRFRT)
15
16%.cc: %.rf $(RFPC)
17        $(RFPC) -cc $<
18
19%.hh: %.rfi
20        $(RFPC) $<
21
22%.o: %.cc %.rf
23#       $(RFPC) -cc $<
24        $(CXX) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(<:.rf=.cc)
25
26$(SAMPLES): %: %.o $(LIBRF) $(LIBRFRT) $(LIBPXX)
27        $(CXX) -o $@ $< $(RF_LDFLAGS) $(RF_LDLIBS)
28
29$(TESTS): %: %.o $(LIBRF) $(LIBRFRT) $(LIBPXX)
30        $(CXX) -o $@ $< $(RF_LDFLAGS) $(RF_LDLIBS)
31
32clean::
33        rm -f $(SAMPLES_EXE) $(TESTS_EXE) *.o *.dep
34
35check:: $(TESTS)
36        @$(foreach target,$(TESTS), \
37          $(TOPDIR)/samples/check.sh $(target) ; \
38        )
39
40DEPS = $(SAMPLES:=.dep)
41DEPS += $(TESTS:=.dep)
Note: See TracBrowser for help on using the repository browser.