H
Henri =?ISO-8859-1?Q?Schom=E4cker?=
Hi folks,
I am developing a apache2 so module in c++.
At the moment, I'm trying to get it to compile with automake & friends, but
don't get it to work. I tried to modify the example in the programmer-docs.
I created a simple c++ project and deleted the src subdir and copied my
sourcecode files into the basedir.
(That's not where I want to let them in the end, but I thought it might be
easier in the beginning)
Then I copied the sample Makefile.am over the existing one and edited it to
what I thought would fit my needs, but It just didn't work. The autotools
just stopped with error code 2. No more "messages", no "problems".
Could please someone help me to make a working Makefile.am out of the sample
info of my manual makefile? - If you're familiar with the autotools, please
point me into the right direction.
I want to build mod_cms.so, dynamically linked to the apache2 and odbc++
libs.
Many thanks in advance,
yours Henri
8<-------- Sample manual makefile 8<--------8<--------8<--------8<--------
###################################################################
# configuring
###################################################################
APXS=apxs2
APACHECTL=apache2ctl
# Get all of apxs's internal values.
APXS_CC=`$(APXS) -q CC`
APXS_TARGET=`$(APXS) -q TARGET`
APXS_CFLAGS=`$(APXS) -q CFLAGS`
APXS_SBINDIR=`$(APXS) -q SBINDIR`
APXS_CFLAGS_SHLIB=`$(APXS) -q CFLAGS_SHLIB`
APXS_INCLUDEDIR=`$(APXS) -q INCLUDEDIR`
APXS_LD_SHLIB=`$(APXS) -q LD_SHLIB`
APXS_LIBEXECDIR=`$(APXS) -q LIBEXECDIR`
APXS_LDFLAGS_SHLIB=`$(APXS) -q LDFLAGS_SHLIB`
APXS_SYSCONFDIR=`$(APXS) -q SYSCONFDIR`
APXS_LIBS_SHLIB=`$(APXS) -q LIBS_SHLIB`
###################################################################
# compiling
###################################################################
mod_cms.o: mod_cms.cpp
libtool g++ -W -c -fPIC -I$(APXS_INCLUDEDIR) -I/usr/include/odbc++ -I. -I-
$(APXS_CFLAGS) $(APXS_CFLAGS_SHLIB) -Wall -o $@ $<
cms_request_data.o: cms_request_data.cpp
libtool g++ -c -fPIC -I$(APXS_INCLUDEDIR) -I. -I- $(APXS_CFLAGS)
$(APXS_CFLAGS_SHLIB) -Wall -o $@ $<
epcre.o: epcre.cpp
libtool g++ -c -fPIC -I/usr/include -I$(APXS_INCLUDEDIR) -I. -I-
$(APXS_CFLAGS) $(APXS_CFLAGS_SHLIB) -Wall -o $@ `pcre-config --cflags` $<
###################################################################
# linking
###################################################################
objects = mod_cms.o cms_request_data.o epcre.o
mod_cms.so: $(objects)
libtool g++ -W -fPIC -shared -L/usr/lib -lodbc++ `pcre-config --libs`
`pcre-config --cflags` -o $@ $(objects)
8<-------- Sample manual makefile 8<--------8<--------8<--------8<--------
--
| Henri Schomäcker - VIRTUAL HOMES
| Datendesign für Internet und Intranet
| henri.schomaecker_at_virtual-homes.de
| http://www.virtual-homes.de
| Public Key: /.gnupg/public_key.txt
--
I am developing a apache2 so module in c++.
At the moment, I'm trying to get it to compile with automake & friends, but
don't get it to work. I tried to modify the example in the programmer-docs.
I created a simple c++ project and deleted the src subdir and copied my
sourcecode files into the basedir.
(That's not where I want to let them in the end, but I thought it might be
easier in the beginning)
Then I copied the sample Makefile.am over the existing one and edited it to
what I thought would fit my needs, but It just didn't work. The autotools
just stopped with error code 2. No more "messages", no "problems".
Could please someone help me to make a working Makefile.am out of the sample
info of my manual makefile? - If you're familiar with the autotools, please
point me into the right direction.
I want to build mod_cms.so, dynamically linked to the apache2 and odbc++
libs.
Many thanks in advance,
yours Henri
8<-------- Sample manual makefile 8<--------8<--------8<--------8<--------
###################################################################
# configuring
###################################################################
APXS=apxs2
APACHECTL=apache2ctl
# Get all of apxs's internal values.
APXS_CC=`$(APXS) -q CC`
APXS_TARGET=`$(APXS) -q TARGET`
APXS_CFLAGS=`$(APXS) -q CFLAGS`
APXS_SBINDIR=`$(APXS) -q SBINDIR`
APXS_CFLAGS_SHLIB=`$(APXS) -q CFLAGS_SHLIB`
APXS_INCLUDEDIR=`$(APXS) -q INCLUDEDIR`
APXS_LD_SHLIB=`$(APXS) -q LD_SHLIB`
APXS_LIBEXECDIR=`$(APXS) -q LIBEXECDIR`
APXS_LDFLAGS_SHLIB=`$(APXS) -q LDFLAGS_SHLIB`
APXS_SYSCONFDIR=`$(APXS) -q SYSCONFDIR`
APXS_LIBS_SHLIB=`$(APXS) -q LIBS_SHLIB`
###################################################################
# compiling
###################################################################
mod_cms.o: mod_cms.cpp
libtool g++ -W -c -fPIC -I$(APXS_INCLUDEDIR) -I/usr/include/odbc++ -I. -I-
$(APXS_CFLAGS) $(APXS_CFLAGS_SHLIB) -Wall -o $@ $<
cms_request_data.o: cms_request_data.cpp
libtool g++ -c -fPIC -I$(APXS_INCLUDEDIR) -I. -I- $(APXS_CFLAGS)
$(APXS_CFLAGS_SHLIB) -Wall -o $@ $<
epcre.o: epcre.cpp
libtool g++ -c -fPIC -I/usr/include -I$(APXS_INCLUDEDIR) -I. -I-
$(APXS_CFLAGS) $(APXS_CFLAGS_SHLIB) -Wall -o $@ `pcre-config --cflags` $<
###################################################################
# linking
###################################################################
objects = mod_cms.o cms_request_data.o epcre.o
mod_cms.so: $(objects)
libtool g++ -W -fPIC -shared -L/usr/lib -lodbc++ `pcre-config --libs`
`pcre-config --cflags` -o $@ $(objects)
8<-------- Sample manual makefile 8<--------8<--------8<--------8<--------
--
| Henri Schomäcker - VIRTUAL HOMES
| Datendesign für Internet und Intranet
| henri.schomaecker_at_virtual-homes.de
| http://www.virtual-homes.de
| Public Key: /.gnupg/public_key.txt
--