[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference smurf::buildhelp

Title:USG buildhelp questions/answers
Moderator:SMURF::FILTER
Created:Mon Apr 26 1993
Last Modified:Mon Jan 20 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2763
Total number of notes:5802

1529.0. "CXX makefile hackery" by AOSG::FILTER (Automatic Posting Software - mail to flume::puck) Fri Jun 23 1995 12:34

Date Of Receipt: 	 7-JUN-1995 18:03:00.83
From: 	SMURF::FLUME::jmf "Joshua M. Friedman OSF/UNIX SDE  07-Jun-1995 1801"
To: 	tomp@DEC:.zko.flume
CC: 	jsd@DEC:.zko.flume, buildhelp@DEC:.zko.flume, sue@DEC:.zko.flume
Subj: 	CXX makefile hackery

Tom, you were working on getting C++ sources to build in our osf/1
build environment, from what I remember.

Do you have any thoughts on this?  Thanks...	-josh

------- Forwarded Message

Return-Path: jsd 
Delivery-Date: Wed, 07 Jun 95 16:00:06 -0400
Return-Path: jsd
Received: from abelia.zk3.dec.com by flume.zk3.dec.com; (5.65v3.0/1.1.8.2/16Jan95-0946AM)
	id AA05233; Wed, 7 Jun 1995 16:00:03 -0400
Received: by wasted.zk3.dec.com; (5.65v3.0/1.1.8.2/18Feb95-1123AM)
	id AA20381; Wed, 7 Jun 1995 15:59:59 -0400
Date: Wed, 7 Jun 1995 15:59:59 -0400
From: John Dustin <jsd>
Message-Id: <9506071959.AA20381@wasted.zk3.dec.com>
To: jmf
Subject: CXX makefile hackery
Cc: johnf jsd

Hi Josh,
	Sean suggested I let you know about this.  I have to do
quite a bit of hackery to get a C++ source file compiled into
a binary under ODE.

	It seems like we should go ahead and add C++ default
object file and binary file rules to the ODE default rule set,
or makefile, or whatever is needed.

Thoughts?

John



#
# Makefile for DHCP server binaries

# need this line so it thinks there's something to build;
# use this strange name so it gets removed during a build clean_all
LIBRARIES	= not_used.o

CXXFILES	= joind.cxx bprelay.cxx jdbdump.cxx jdbmod.cxx jdbreg.cxx \
		  ldnames.cxx mkname.cxx showdbb.cxx showdbs.cxx

OFILES		= joind.o bprelay.o jdbdump.o jdbmod.o jdbreg.o \
		  ldnames.o mkname.o showdbb.o showdbs.o not_used.o

IDIR       	= /usr/sbin
CFLAGS		= 
CXXFLAGS	=

CLIB = ../dccommon.a
DLIB = ../dcserver.a
MLIB = ../db.a
NLIB = ../net.a
ULIB = ../libutil.a
TLIB = ../bsdbtree.a
MYLIBS = ${DLIB} ${CLIB} ${NLIB} ${ULIB} ${MLIB} ${TLIB}

MYDEFINES	= `genpath -I../include` -D__unix -DOSF1 -DDEBUG=3

include ${MAKEFILEPATH}/standard.mk
include ${MAKEFILEPATH}/objects.mk
include ${MAKEFILEPATH}/programs.mk
include ${MAKEFILEPATH}/libs.mk

CXX		= ${_CC_EXEC_PREFIX_}cxx

_CXXFLAGS_	= ${_CCFLAGS_} -I${_CC_EXEC_PREFIX_}/usr/include/cxx ${CXXFLAGS}

.SUFFIXES: .cxx

mkname.o: namepool.cxx
	${CXX} -o mkname namepool.cxx -DGENERATE_NAME ${MYDEFINES} \
		${_CXXFLAGS_} $(_CC_LIBDIRS_) -lcxx ${MYLIBS}
	touch mkname.o

ldnames.o: namepool.cxx
	${CXX} -o ldnames namepool.cxx -DLOAD_NAMES ${MYDEFINES} \
		${_CXXFLAGS_} $(_CC_LIBDIRS_) -lcxx ${MYLIBS}
	touch ldnames.o

# We fake building a .o file (we really build a binary) so we then
# touch the .o file, so it can ld everything into a (useless) library.
.cxx.o:
	${CXX} -o $* $*.cxx ${MYDEFINES} ${_CXXFLAGS_} \
		$(_CC_LIBDIRS_) -lcxx ${MYLIBS}
	touch $*.o



------- End of Forwarded Message


T.RTitleUserPersonal
Name
DateLines
1529.1Re: CXX makefile hackeryAOSG::FILTERAutomatic Posting Software - mail to flume::puckFri Jun 23 1995 13:0223
Date Of Receipt: 	 8-JUN-1995 12:51:38.55
From: 	SMURF::QUARRY::tomp "Tom Peterson USG  08-Jun-1995 1250"
To: 	"Joshua M. Friedman, OSF/UNIX SDE 381-1548" <jmf@DEC:.zko.quarry>
CC: 	tomp@DEC:.zko.quarry, jsd@DEC:.zko.quarry, buildhelp@DEC:.zko.quarry,
	sue@DEC:.zko.quarry
Subj: 	Re: CXX makefile hackery

> Tom, you were working on getting C++ sources to build in our osf/1
> build environment, from what I remember.

My task was to make a C++ kit usable under ODE & my testing was rather
simplistic and command line based.  I've not delved into the details
of how the kit is actually used in the builds.  The X11 and CDE pools
use it quite a bit, so perhaps some ideas can be borrowed from there.
However, since there are significant build differences in these trees,
I'm not sure how much will apply.  You might want to talk to someone
in the CDE group, since they probably have the most experience using
it.  Sorry I can't be of much more help than that.  As mentioned
before, John is breaking new ground using C++ in the base OS, so I
think some of this will have to be trial & error.

- Tom