summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-03-26 00:28:08 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-03-26 00:28:08 +0000
commitc36c174923a23f649d5130c218c54f5b683c10ac (patch)
tree244f981482d088eb3e0b416244fc2df137a3d9aa /gnu
parentb36b919d75c6487cc148eca77216f43bfb1e0f20 (diff)
Make "make obj" work, make builds to obj directories work. Don't put
object files in SRCS variables, add them to OBJS instead. Also explicitly mention -lg++ because g++ won't use the -L path for getting libg++ unless done via the command line.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/lib/libg++/libg++/Makefile.bsd-wrapper41
-rw-r--r--gnu/lib/libg++/libg++/gperf/Makefile.bsd-wrapper31
2 files changed, 58 insertions, 14 deletions
diff --git a/gnu/lib/libg++/libg++/Makefile.bsd-wrapper b/gnu/lib/libg++/libg++/Makefile.bsd-wrapper
index d7119bea3be..6e356a4943d 100644
--- a/gnu/lib/libg++/libg++/Makefile.bsd-wrapper
+++ b/gnu/lib/libg++/libg++/Makefile.bsd-wrapper
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.1 1996/03/16 05:18:44 etheisen Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.2 1996/03/26 00:27:38 niklas Exp $
VERSION = 2.7.1
LIBG++_DIST_VERSION = 2.7.1
@@ -28,12 +28,35 @@ CSRCS= bitand.c bitany.c bitblt.c bitclear.c bitcopy.c bitcount.c \
COBJS= $(CSRCS:N*.h:R:S/$/.o/g)
GXXOBJS= $(CXXOBJS) $(COBJS)
-RX_DIR= ../librx
-RXOBJ= $(RX_DIR)/rx.o
-LIBIO_DIR= ../libio
-G_CFG_H= $(LIBIO)/_G_config.h
+.if defined(OBJMACHINE)
+OBJDIR= obj.${MACHINE}
+.else
+OBJDIR= obj
+.endif
-SRCS= $(CXXSRCS) $(CSRCS) $(RXOBJ)
+RX_DIR= $(.CURDIR)/../librx
+
+RX_OBJDIR!= if [ -d $(RX_DIR)/$(OBJDIR) ]; then \
+ echo $(RX_DIR)/$(OBJDIR); \
+ else \
+ echo $(RX_DIR); \
+ fi
+
+RXOBJ= $(RX_OBJDIR)/rx.o
+
+LIBIO_DIR= $(.CURDIR)/../libio
+
+LIBIO_OBJDIR!= if [ -d $(LIBIO_DIR)/$(OBJDIR) ]; then \
+ echo $(LIBIO_DIR)/$(OBJDIR); \
+ else \
+ echo $(LIBIO_DIR); \
+ fi
+
+G_CFG_H= $(LIBIO_OBJDIR)/_G_config.h
+
+SRCS= $(CXXSRCS) $(CSRCS)
+
+OBJS= $(RXOBJ)
CLEANFILES+= rx.h
@@ -42,13 +65,13 @@ all: rx.h $(G_CFG_H)
beforedepend: rx.h $(G_CFG_H)
rx.h:
- ln -s $(.CURDIR)/../librx/rx.h
+ ln -s $(RX_DIR)/rx.h
$(G_CFG_H):
- @cd $(.CURDIR)/../libio; $(MAKE) -f Makefile.bsd-wrapper _G_config.h
+ @cd $(LIBIO_DIR); $(MAKE) -f Makefile.bsd-wrapper _G_config.h
$(RXOBJ) $(RXOBJ:.o=.po) $(RXOBJ:.o=.so):
- cd $(.CURDIR)/../$(RX_DIR); $(MAKE) -f Makefile.bsd-wrapper
+ cd $(RX_DIR); $(MAKE) -f Makefile.bsd-wrapper
clean: _SUBDIRUSE
rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
diff --git a/gnu/lib/libg++/libg++/gperf/Makefile.bsd-wrapper b/gnu/lib/libg++/libg++/gperf/Makefile.bsd-wrapper
index 4a536e26b2f..6f004ebbdeb 100644
--- a/gnu/lib/libg++/libg++/gperf/Makefile.bsd-wrapper
+++ b/gnu/lib/libg++/libg++/gperf/Makefile.bsd-wrapper
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.1 1996/03/16 05:18:48 etheisen Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.2 1996/03/26 00:28:07 niklas Exp $
.PATH: $(.CURDIR)/src
@@ -10,17 +10,38 @@ CPPFLAGS+= -nostdinc++ -I$(.CURDIR)/src -I$(.CURDIR)/../../libio \
SRCS= new.cc options.cc iterator.cc main.cc gen-perf.cc \
key-list.cc list-node.cc hash-table.cc bool-array.cc \
read-line.cc std-err.cc version.cc
-LDFLAGS+= -L../../libstdc++ -L..
+
+.if defined(OBJMACHINE)
+OBJDIR= obj.${MACHINE}
+.else
+OBJDIR= obj
+.endif
STD_DIR= ../../libstdc++
+
+STD_OBJDIR!= if [ -d $(STD_DIR)/$(OBJDIR) ]; then \
+ echo $(STD_DIR)/$(OBJDIR); \
+ else \
+ echo $(STD_DIR); \
+ fi
+
GXX_DIR= ..
-all: $(STD_DIR)/libstdc++.a $(GXX_DIR)/libg++.a
+GXX_OBJDIR!= if [ -d $(GXX_DIR)/$(OBJDIR) ]; then \
+ echo $(GXX_DIR)/$(OBJDIR); \
+ else \
+ echo $(GXX_DIR); \
+ fi
+
+LDFLAGS+= -L$(STD_OBJDIR) -L$(GXX_OBJDIR)
+LDADD+= -lg++
+
+all: $(STD_OBJDIR)/libstdc++.a $(GXX_OBJDIR)/libg++.a
-$(STD_DIR)/libstdc++.a:
+$(STD_OBJDIR)/libstdc++.a:
cd $(STD_DIR); $(MAKE) -f Makefile.bsd-wrapper
-$(GXX_DIR)/libg++.a:
+$(GXX_OBJDIR)/libg++.a:
cd $(GXX_DIR); $(MAKE) -f Makefile.bsd-wrapper
install: maninstall