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

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