define __KERNEL_STRICT_NAMES to avoid inclusion of kernel types on systems that carry...
[cake.git] / tools / cxref / cpp / Makefile.in
blobbe941c4f110d1cf79f7e21ebc2e3f93a0192dc40
1 # $Header$
3 # C Cross Referencing & Documentation tool. Version 1.5g.
5 # CPP Makefile.
7 # Written by Andrew M. Bishop
9 # This file Copyright 1995,96,99,2000,01,02,04 Andrew M. Bishop
10 # It may be distributed under the GNU Public License, version 2, or
11 # any higher version. See section COPYING of the GNU Public license
12 # for conditions under which this file may be redistributed.
15 # autoconf things
17 srcdir=@srcdir@
18 VPATH=@srcdir@
20 # The installation locations
22 prefix=@prefix@
23 exec_prefix=@exec_prefix@
24 bindir=$(DESTDIR)@bindir@
25 mandir=$(DESTDIR)@mandir@
26 datadir=$(DESTDIR)@datadir@/cxref
28 # The installation program.
30 INSTALL=@INSTALL@
32 # The C compiler and linker
34 CC=@CC@
35 LD=@CC@
37 CFLAGS=@CFLAGS@
38 LDFLAGS=@LDFLAGS@
40 # The Yacc program
42 YACC=@YACC@ -l
44 ########
46 INCLUDE=-I.
47 LIBRARY=@LIBS@
49 ########
51 programs : @CXREF_CPP@
53 ########
55 OBJ_FILES=cccp.o cexp.o version.o
57 ####
59 cxref-cpp : $(OBJ_FILES) cxref-cpp.defines
60 $(LD) $(LDFLAGS) $(OBJ_FILES) -o $@ $(LIBRARY)
61 @touch $@
63 ########
65 install : programs
66 [ ! -f cxref-cpp ] || $(INSTALL) -m 755 cxref-cpp $(bindir)
67 [ ! -f cxref-cpp ] || $(INSTALL) -m 644 cxref-cpp.man $(mandir)/man1/cxref-cpp.1
68 [ ! -f cxref-cpp ] || $(INSTALL) -m 755 cxref-cpp-configure $(bindir)
69 [ ! -f cxref-cpp ] || $(INSTALL) -m 644 cxref-cpp-configure.man $(mandir)/man1/cxref-cpp-configure.1
70 [ ! -f cxref-cpp ] || [ -d $(datadir) ] || $(INSTALL) -d $(datadir)
71 [ ! -f cxref-cpp ] || $(INSTALL) -m 644 cxref-cpp.defines $(datadir)
73 install-win32 : programs
74 [ ! -f cxref-cpp.exe ] || $(INSTALL) -m 755 cxref-cpp.exe $(bindir)
75 [ ! -f cxref-cpp.exe ] || $(INSTALL) -m 755 cxref-cpp-configure $(bindir)
76 [ ! -f cxref-cpp.exe ] || [ -d $(datadir) ] || $(INSTALL) -d $(datadir)
77 [ ! -f cxref-cpp.exe ] || $(INSTALL) -m 644 cxref-cpp.defines $(datadir)
79 ########
81 clean :
82 -rm -f cxref-cpp core *.o *~ y.tab.c
84 ####
86 distclean : clean
87 -rm -f Makefile cxref-cpp-configure autoconfig.h \
88 config.log config.status config.cache conftest.gcc
90 ########
92 cexp.c : cexp.y
93 $(YACC) $(srcdir)/cexp.y
94 @touch $@
95 @mv y.tab.c cexp.c
97 ####
99 cccp.o: cccp.c config.h tm.h pcp.h autoconfig.h
100 $(CC) -c -w $(CFLAGS) $(srcdir)/cccp.c -o $@ $(INCLUDE) \
101 '-DLOCAL_INCLUDE_DIR="INCLUDE_DIR1"' \
102 '-DTOOL_INCLUDE_DIR="INCLUDE_DIR2"' \
103 '-DGCC_INCLUDE_DIR="INCLUDE_DIR3"' \
104 '-DGPLUSPLUS_INCLUDE_DIR="."' \
105 '-DCXREF_CPP_DEFINES="$(datadir)/cxref-cpp.defines"'
106 @touch $@
108 ####
110 .SUFFIXES:
111 .SUFFIXES: .c .o
113 .c.o:
114 $(CC) -c -w $(CFLAGS) $< -o $@ $(INCLUDE)
115 @touch $@
117 version.o : version.c
118 cexp.o : cexp.c config.h tm.h autoconfig.h
120 ########
122 cxref-cpp.defines : cxref-cpp-configure
123 ./cxref-cpp-configure $(CC) -o $@
125 ########