OSDN Git Service

Fix no pic
[uclinux-h8/uClinux-dist.git] / user / gnugk / Makefile.in
1 # -*- mode: Makefile -*-
2 # Copyright (C) 2002 by its various Authors, see CVS-log
3 #
4 # PURPOSE OF THIS FILE: Make file for OpenH323 Gatekeeper
5 #
6 # - Automatic Version Information via RCS:
7 #   $Id: Makefile.in,v 1.24 2006/07/06 18:25:19 willamowius Exp $
8 #   $Source: /cvsroot/openh323gk/openh323gk/Makefile.in,v $
9 #
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 2 of the License, or
13 # (at your option) any later version.
14 #
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 #
24
25 PROG     = gnugk
26 SOURCES  = main.cxx singleton.cxx job.cxx yasocket.cxx h323util.cxx \
27            Toolkit.cxx SoftPBX.cxx GkStatus.cxx RasTbl.cxx Routing.cxx \
28            Neighbor.cxx GkClient.cxx gkauth.cxx RasSrv.cxx ProxyChannel.cxx \
29            gk.cxx version.cxx gkacct.cxx gktimer.cxx gkconfig.cxx \
30            sigmsg.cxx clirw.cxx cisco.cxx ipauth.cxx statusacct.cxx \
31            syslogacct.cxx capctrl.cxx @SOURCES@
32
33 HEADERS  = GkClient.h GkStatus.h Neighbor.h ProxyChannel.h RasPDU.h \
34            RasSrv.h RasTbl.h Routing.h SoftPBX.h Toolkit.h factory.h \
35            gk.h gk_const.h gkacct.h gkauth.h job.h name.h rasinfo.h rwlock.h \
36            singleton.h slist.h stl_supp.h version.h yasocket.h gktimer.h \
37            gkconfig.h configure Makefile sigmsg.h clirw.h cisco.h ipauth.h \
38            statusacct.h syslogacct.h capctrl.h @HEADERS@
39
40 # add cleanup files for non-default targets
41 CLEAN_FILES += $(OBJDIR)/addpasswd $(OBJDIR)/addpasswd.o docs/manual/*.html
42 # add cleanup files for autoconf
43 #CLEAN_FILES += Makefile config.*
44
45 # colon, the empty variable and a single space are special characters to
46 # MAKE and may cause trouble. Let's 'quote' the little bastards by
47 # assigning it to a variable
48 colon:=:
49 comma:=,
50 empty:=
51 space:=$(empty) $(empty)
52
53 # remove half updated or corrupt files
54 .DELETE_ON_ERROR:
55
56 # setup various important paths
57 PWLIBDIR=@PWLIBDIR@
58 OPENH323DIR=@OPENH323DIR@
59 OPENH323MAKEDIR=@OPENH323MAKEDIR@
60
61 ifndef TMP
62   TMP=/tmp
63 endif
64
65 ifeq (@NEEDOPENH323PREFIX@,1)
66 ifndef PREFIX
67 PREFIX=@OPENH323INSTALLPREFIX@
68 endif
69 endif
70
71 CWD:=$(shell pwd)
72
73
74 # having an own idea about default targets. This leads to nicly
75 # maintainable binaries with proper library dependence, libraries may be
76 # replaced on the fly.
77 .PHONY: bothdepend bothshared gkdefault
78 .DEFAULT: gkdefault
79 gkdefault: bothdepend bothshared
80
81 # LD_RUN_LIST is the list form of the LD_RUN_PATH
82 LD_RUN_LIST := $(subst $(colon),$(space),$(LD_RUN_PATH))
83 LD_RUN_LIST += $(PWLIBDIR)/lib $(OPENH323DIR)/lib
84
85 # compiler/linker flags set by configure script
86 STDCCFLAGS += @STDCCFLAGS@
87 LDFLAGS    += @LDFLAGS@
88 ENDLDLIBS  += @ENDLDLIBS@
89 ENDLDFLAGS += @ENDLDFLAGS@
90
91 STDCCFLAGS += -D'MANUFACTURER=@MANUFACTURER@'
92 STDCCFLAGS += -D'PROGRAMMNAME=@PROGRAMNAME@'
93
94 # automatically include debugging code or not
95 ifdef PASN_NOPRINT
96   STDCCFLAGS += -DPASN_NOPRINT
97 else
98   STDCCFLAGS += -DPTRACING
99 endif
100
101 ###
102 ### Including the general make rules of OpenH323
103 ###
104
105 include $(OPENH323MAKEDIR)/openh323u.mak
106
107 ### Remove -fdata-sections gcc option that cause problems during link step
108 temp_STDCCFLAGS := $(subst -fdata-sections,,$(STDCCFLAGS))
109 STDCCFLAGS = $(temp_STDCCFLAGS)
110
111 # GK version infomation
112 STDCCFLAGS      += -DMAJOR_VERSION=@GNUGK_MAJOR_VERSION@ -DMINOR_VERSION=@GNUGK_MINOR_VERSION@ -DBUILD_NUMBER=@GNUGK_BUILD_NUMBER@
113
114 OPTCCFLAGS      = -O2
115
116 # special dependency to ensure version.cxx is rebuilt each time gnugk is recompiled
117 # so the proper build timestamp is included
118 versionts.h: $(subst version.cxx,,$(SOURCES)) $(HEADERS) $(OH323_LIBDIR)/$(OH323_FILE) $(PW_LIBDIR)/$(PTLIB_FILE)
119         @touch $@
120
121 # extra targets
122 addpasswd: $(OBJDIR)/addpasswd.o
123         $(CXX) -o $(OBJDIR)/addpasswd $(CFLAGS) $(OBJDIR)/addpasswd.o $(LDFLAGS) -l$(PTLIB_BASE)$(LIB_TYPE) $(ENDLDLIBS) $(ENDLDFLAGS)
124
125 doc:
126         $(MAKE) -C docs/manual html
127
128 install: install-addpasswd
129
130 install-addpasswd: addpasswd
131         $(INSTALL) $(OBJDIR)/addpasswd $(INSTALLBIN_DIR)
132
133 #
134 # By this command the build number may be incremented
135 #
136 .PHONY: increment
137
138 # Use this to increment the build number
139 increment:
140         -@BN=@GNUGK_BUILD_NUMBER@; \
141         BNN=`expr "$$BN" + 1`; \
142         echo "Upgrading from build $$BN to $$BNN"; \
143         cp version.h $(TMP)/version.h; \
144         sed -e 's/BUILD_NUMBER.*'"$$BN"'/BUILD_NUMBER '"$$BNN/" \
145                 $(TMP)/version.h > version.h; \
146         rm -f $(TMP)/version.h; \
147                 echo "Rerunning configure utility"; \
148                 ./configure
149
150 # special configure dependencies
151 configure: configure.in
152         autoconf
153
154 Makefile: Makefile.in config.status
155         ./config.status
156
157 config.status: configure
158         ./config.status --recheck
159