Code

avoid name collision
[inkscape.git] / cxxtest / sample / Makefile.unix
1 #
2 # Makefile for UN*X-like systems
3 #
5 # Change this line if you want a different compiler
6 CXXC = c++ -Wall -W -Werror -I. -I..
8 # If you want to use python, specify USE_PYTHON=1 on the command line
9 ifdef USE_PYTHON
10         TESTGEN = ../cxxtestgen.py
11 else
12         TESTGEN = ../cxxtestgen.pl
13 endif
15 # For the X11 GUI
16 X11_FLAGS = -I/usr/X11R6/include -L/usr/X11R6/lib -lX11
18 # For the Qt GUI
19 #QTDIR = /usr/lib/qt
20 QTLIB = -lqt-mt
21 #QTLIB = -lqt
22 QT_FLAGS = -I$(QTDIR)/include -L$(QTDIR)/lib $(QTLIB) -O2
24 TARGETS = error_printer stdio_printer yes_no_runner file_printer aborter only
25 GUI_TARGETS = x11_runner qt_runner
26 TESTS = *.h
27 GUI_TESTS = gui/GreenYellowRed.h $(TESTS)
29 all: $(TARGETS)
31 clean:
32         rm -f *~ *.o *.obj $(TARGETS) $(GUI_TARGETS)
33         rm -f tests.cpp error_printer.cpp stdio_printer.cpp file_printer.cpp aborter.cpp only.cpp
34         rm -f x11_runner.cpp qt_runner.cpp
36 distclean: clean
37         rm -f Makefile
39 run: error_printer
40         ./error_printer
42 run_x11: x11_runner
43         ./x11_runner
45 run_qt: qt_runner
46         ./qt_runner
48 error_printer.cpp: $(TESTS)
49         $(TESTGEN) -o $@ --error-printer $(TESTS)
51 stdio_printer.cpp: $(TESTS)
52         $(TESTGEN) -o $@ --runner=StdioPrinter $(TESTS)
54 file_printer.cpp: file_printer.tpl $(TESTS)
55         $(TESTGEN) -o $@ --template=file_printer.tpl $(TESTS)
57 aborter.cpp: aborter.tpl $(TESTS)
58         $(TESTGEN) -o $@ --template=aborter.tpl $(TESTS)
60 only.cpp: only.tpl $(TESTS)
61         $(TESTGEN) -o $@ --template=only.tpl $(TESTS)
63 tests.cpp: $(TESTS)
64         $(TESTGEN) -o $@ $(TESTS)
66 x11_runner.cpp: $(GUI_TESTS)
67         $(TESTGEN) -o $@ --gui=X11Gui $(GUI_TESTS)
69 qt_runner.cpp: $(GUI_TESTS)
70         $(TESTGEN) -o $@ --gui=QtGui $(GUI_TESTS)
72 %: %.cpp
73         $(CXXC) -o $@ $<
75 yes_no_runner: yes_no_runner.cpp tests.cpp
76         $(CXXC) -o $@ $^
78 x11_runner: x11_runner.cpp
79         $(CXXC) -o $@ $^ $(X11_FLAGS)
81 qt_runner: qt_runner.cpp
82         $(CXXC) -o $@ $^ $(QT_FLAGS)
84 #
85 # Local Variables:
86 # compile-command: "make -fMakefile.unix"
87 # End:
88 #