Fix for UBSan build
[platform/upstream/doxygen.git] / src / Makefile.libdoxycfg
1 #
2 # $Id: libdoxycfg.t,v 1.1 2001/03/19 19:27:41 root Exp $
3 #
4 # Copyright (C) 1997-2012 by Dimitri van Heesch.
5 #
6 # Permission to use, copy, modify, and distribute this software and its
7 # documentation under the terms of the GNU General Public License is hereby 
8 # granted. No representations are made about the suitability of this software 
9 # for any purpose. It is provided "as is" without express or implied warranty.
10 # See the GNU General Public License for more details.
11 #
12 # Documents produced by Doxygen are derivative works derived from the
13 # input used in their production; they are not affected by this license.
14 #############################################################################
15 # Makefile for building ../lib/libdoxycfg.a
16 # Generated by tmake at 16:29, 2012/08/11
17 #     Project: libdoxycfg
18 #    Template: libdoxycfg.t
19 #############################################################################
20
21 ####### Compiler, tools and options
22
23 CC      =       cc
24 CXX     =       c++
25 CFLAGS  =       -pipe -Wall -W -Wno-deprecated-declarations -Wno-invalid-source-encoding -g -fstack-protector
26 CXXFLAGS=       -pipe -D__FreeBSD__=6 -DYY_TYPEDEF_YY_SIZE_T -Dyy_size_t=int -Wall -W -Wno-deprecated-declarations -Wno-invalid-source-encoding -g -fstack-protector
27 INCPATH =       -I../qtools
28 AR      =       ar cq
29 RANLIB  =       ranlib
30 MOC     =       /usr/bin/moc
31
32 TAR     =       tar -cf
33 GZIP    =       gzip -9f
34
35 ####### Files
36
37 HEADERS =       config.h \
38                 configoptions.h \
39                 portable.h
40 SOURCES =       config.cpp \
41                 configoptions.cpp \
42                 portable.cpp \
43                 portable_c.c
44 OBJECTS =       ../objects/config.o \
45                 ../objects/configoptions.o \
46                 ../objects/portable.o \
47                 ../objects/portable_c.o
48 SRCMOC  =       
49 OBJMOC  =       
50 DIST    =       
51 TARGET  =       ../lib/libdoxycfg.a
52
53 ####### Implicit rules
54
55 .SUFFIXES: .cpp .cxx .cc .C .c
56
57 .cpp.o:
58         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
59
60 .cxx.o:
61         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
62
63 .cc.o:
64         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
65
66 .C.o:
67         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
68
69 .c.o:
70         $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
71
72 ####### Build rules
73
74 all: $(TARGET)
75
76 staticlib: $(TARGET)
77
78 $(TARGET): $(OBJECTS) $(OBJMOC) 
79         -rm -f $(TARGET)
80         $(AR) $(TARGET) $(OBJECTS) $(OBJMOC)
81         ranlib $(TARGET)
82
83 moc: $(SRCMOC)
84
85 tmake:
86         tmake libdoxycfg.pro
87
88 dist:
89         $(TAR) libdoxycfg.tar libdoxycfg.pro $(SOURCES) $(HEADERS) $(DIST)
90         $(GZIP) libdoxycfg.tar
91
92 clean:
93         -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(TARGET)
94         -rm -f *~ core
95
96 ####### Compile
97
98 ../objects/config.o: config.cpp \
99                 config.h \
100                 qtbc.h \
101                 ftextstream.h \
102                 version.h \
103                 portable.h \
104                 util.h \
105                 sortdict.h \
106                 types.h \
107                 lang_cfg.h \
108                 configoptions.h
109         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../objects/config.o config.cpp
110
111 ../objects/configoptions.o: configoptions.cpp \
112                 configoptions.h \
113                 config.h \
114                 qtbc.h \
115                 ftextstream.h \
116                 portable.h
117         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../objects/configoptions.o configoptions.cpp
118
119 ../objects/portable.o: portable.cpp \
120                 portable.h \
121                 debug.h
122         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../objects/portable.o portable.cpp
123
124 ../objects/portable_c.o: portable_c.c
125         $(CC) -c $(CFLAGS) $(INCPATH) -o ../objects/portable_c.o portable_c.c
126
127
128 LEX     =   /usr/bin/flex
129 YACC    =   /usr/bin/bison
130
131
132 ####################
133
134 config.cpp: config.l \
135                 config.h \
136                 qtbc.h \
137                 ftextstream.h \
138                 version.h \
139                 portable.h \
140                 util.h \
141                 sortdict.h \
142                 types.h \
143                 lang_cfg.h \
144                 configoptions.h
145         $(LEX) -PconfigYY -t config.l >config.cpp 
146
147 configoptions.cpp: config.xml
148         python configgen.py config.xml >configoptions.cpp
149