Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 09a5dab

Browse files
committed
Remove port specific Makefile 'targets' (ie. shared libraries) from
Makefile.global and move them to seperate 'include' makefiles Over time, should become even more port specific: ie. Makefile.BSD44_derived should be broken down into netbsd/freebsd specific ports
1 parent 7113e88 commit 09a5dab

14 files changed

+110
-173
lines changed

src/Makefile.global.in

+9-173
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.19 1997/04/04 11:21:39 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.20 1997/04/12 10:32:03 scrappy Exp $
1111
#
1212
# NOTES
1313
# Essentially all Postgres make files include this file and use the
@@ -227,16 +227,6 @@ DASH_N= @DASH_N@
227227
BACKSLASH_C= @BACKSLASH_C@
228228

229229

230-
##############################################################################
231-
#
232-
# Customization.
233-
#
234-
# This includes your local customizations if Makefile.custom exists
235-
# in the source directory. This file doesn't exist in the original
236-
# distribution so that it doesn't get overwritten when you upgrade.
237-
ifneq ($(wildcard $(SRCDIR)/Makefile.custom), )
238-
include $(SRCDIR)/Makefile.custom
239-
endif
240230

241231
#-------------------------------------------------------------
242232
# See the subdirectory template for default settings for these
@@ -251,171 +241,17 @@ CFLAGS_SL= @SHARED_LIB@
251241
LDFLAGS= @LDFLAGS@ @LIBS@
252242
DLSUFFIX= @DLSUFFIX@
253243

254-
#----------------------------------------------------------------------
255-
ifeq ($(PORTNAME), BSD44_derived)
256-
%.so: %.o
257-
$(LD) -x -r -o $<.obj $<
258-
@echo building shared object $@
259-
@rm -f $@.pic
260-
@${AR} cq $@.pic `lorder $<.obj | tsort`
261-
${RANLIB} $@.pic
262-
@rm -f $@
263-
$(LD) -x -Bshareable -Bforcearchive \
264-
-o $@ $@.pic
265-
endif
266-
267-
#--------------------------------------------------------------------------
268-
269-
ifeq ($(PORTNAME), aix)
270-
271-
# MAKE_EXPORTS is required for svr4 loaders that want a file of
272-
# symbol names to tell them what to export/import.
273-
MAKE_EXPORTS= true
274-
275-
EXPSUFF= .exp
276-
277-
POSTGRES_EXP= $(SRCDIR)/backend/postgres$(EXPSUFF)
278-
279-
MKLDEXPORT=$(SRCDIR)/backend/port/aix/mkldexport.sh
280-
281-
%$(EXPSUFF): %.o
282-
$(MKLDEXPORT) $< `pwd` > $@
283-
284-
$(POSTGRES_EXP):
285-
$(MAKE) -C $(SRCDIR)/backend postgres.exp
286-
287-
%.so: %.o %$(EXPSUFF) $(POSTGRES_EXP)
288-
@echo Making share library $@ from $*.o, $*$(EXPSUFF), and postgres.exp
289-
$(LD) -H512 -T512 -o $@ -e _nostart \
290-
-bI:$(POSTGRES_EXP) -bE:$*$(EXPSUFF) \
291-
$*.o @MATH_LIB@ -lc 2>/dev/null
292-
endif
293-
294-
#---------------------------------------------------------------------------
295-
296-
ifeq ($(PORTNAME), alpha)
297-
%.so: %.o
298-
$(LD) -shared -expect_unresolved '*' -o $@ $<
299-
endif
300-
301-
#--------------------------------------------------------------------------
302-
303-
ifeq ($(PORTNAME), dgux)
304-
%.so: %.o
305-
$(CC) -shared -o $@ $<
306-
endif
307-
308-
#----------------------------------------------------------------------------
309-
310-
ifeq ($(PORTNAME), hpux)
311-
312-
#ifdef ENFORCE_ALIGNMENT
313-
# CFLAGS_BE= -DNOFIXADE
314-
#else
315-
# HPUX_VERS:= $(shell uname -r)
316-
# HPUX_MAJOR= ${HPUX_VERS:R:E}
317-
# HPUX_MINOR= ${HPUX_VERS:E}
318-
# ifeq ($(HPUX_MAJOR), 08)
319-
# CFLAGS_BE+= +u -DHP_S500_ALIGN
320-
# LDFLAGS_BE+= +u
321-
# else
322-
# ifeq ($(HPUX_MAJOR), 09)
323-
# ifeq ($(CC), cc)
324-
# CFLAGS_BE+= +u4
325-
# LDFLAGS_BE+= +u4
326-
# endif
327-
# endif
328-
# endif
329-
#endif
330-
331-
%.sl: %.o
332-
$(LD) -b -o $@ $<
333-
334-
endif
335-
336-
#--------------------------------------------------------------------------
337-
338-
ifeq ($(PORTNAME), i386_solaris)
339-
%.so: %.o
340-
$(LD) -G -Bdynamic -o $@ $<
341-
endif
342-
343-
#----------------------------------------------------------------------------
344-
345-
ifeq ($(PORTNAME), irix5)
346-
347-
# RANLIB is not used on IRIX 5
348-
RANLIB= touch
349-
350-
%.so: %.o
351-
$(LD) -G -Bdynamic -o $@ $< $(LDFLAGS)
352-
353-
endif
354-
355-
#---------------------------------------------------------------------------
356-
357-
ifeq ($(PORTNAME), linux)
358-
ifdef LINUX_ELF
359-
LDFLAGS+= -rdynamic
360-
endif
361-
MK_NO_LORDER= true
362-
363-
%.so: %.o
364-
$(CC) -shared -o $@ $<
365-
366-
endif
367-
368-
#---------------------------------------------------------------------------
369-
370-
ifeq ($(PORTNAME), sunos4)
371-
%.so: %.o
372-
$(LD) -dc -dp -Bdynamic -o $@ $<
373-
endif
374-
375-
#----------------------------------------------------------------------------
376-
377-
ifeq ($(PORTNAME), sparc_solaris)
378-
%.so: %.o
379-
$(LD) -G -Bdynamic -o $@ $<
380-
endif
381-
382-
#-----------------------------------------------------------------------------
383-
384-
ifeq ($(PORTNAME), svr4)
385-
# MAKE_EXPORTS is required for svr4 loaders that want a file of
386-
# symbol names to tell them what to export/import.
387-
MAKE_EXPORTS= true
388-
389-
LDFLAGS+= /usr/ucblib/libucb.a -LD-Blargedynsym
390-
391-
%.so: %.o
392-
$(LD) -G -Bdynamic -o $@ $<
393-
394-
endif
395-
396-
#---------------------------------------------------------------------------
397-
398-
ifeq ($(PORTNAME), ultrix4)
399-
# install creates intermediate directories
400-
NO_BEFOREINSTL= true
401-
endif
402-
403-
404-
#-----------------------------------------------------------------------------
244+
include $(SRCDIR)/Makefile.port
405245

246+
##############################################################################
406247
#
407-
# The univel port is almost guaranteed NOT to work yet.
248+
# Customization.
408249
#
409-
ifeq ($(PORTNAME), univel)
410-
# MAKE_EXPORTS is required for svr4 loaders that want a file of
411-
# symbol names to tell them what to export/import.
412-
#MAKE_EXPORTS= true
413-
414-
%.so: %.o
415-
$(LD) -G -Bdynamic -o $@ $<
416-
417-
INSTALL= /usr/ucb/install
418-
250+
# This includes your local customizations if Makefile.custom exists
251+
# in the source directory. This file doesn't exist in the original
252+
# distribution so that it doesn't get overwritten when you upgrade.
253+
ifneq ($(wildcard $(SRCDIR)/Makefile.custom), )
254+
include $(SRCDIR)/Makefile.custom
419255
endif
420256

421257
# This goes here so that customization in Makefile.custom is effective

src/makefiles/Makefile.BSD44_derived

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
%.so: %.o
2+
$(LD) -x -r -o $<.obj $<
3+
@echo building shared object $@
4+
@rm -f $@.pic
5+
@${AR} cq $@.pic `lorder $<.obj | tsort`
6+
${RANLIB} $@.pic
7+
@rm -f $@
8+
$(LD) -x -Bshareable -Bforcearchive \
9+
-o $@ $@.pic

src/makefiles/Makefile.aix

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# MAKE_EXPORTS is required for svr4 loaders that want a file of
2+
# symbol names to tell them what to export/import.
3+
MAKE_EXPORTS= true
4+
5+
EXPSUFF= .exp
6+
7+
POSTGRES_EXP= $(SRCDIR)/backend/postgres$(EXPSUFF)
8+
9+
MKLDEXPORT=$(SRCDIR)/backend/port/aix/mkldexport.sh
10+
11+
%$(EXPSUFF): %.o
12+
$(MKLDEXPORT) $< `pwd` > $@
13+
14+
$(POSTGRES_EXP):
15+
$(MAKE) -C $(SRCDIR)/backend postgres.exp
16+
17+
%.so: %.o %$(EXPSUFF) $(POSTGRES_EXP)
18+
@echo Making share library $@ from $*.o, $*$(EXPSUFF), and postgres.exp
19+
$(LD) -H512 -T512 -o $@ -e _nostart \
20+
-bI:$(POSTGRES_EXP) -bE:$*$(EXPSUFF) \
21+
$*.o @MATH_LIB@ -lc 2>/dev/null

src/makefiles/Makefile.alpha

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
%.so: %.o
2+
$(LD) -shared -expect_unresolved '*' -o $@ $<

src/makefiles/Makefile.dgux

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
%.so: %.o
2+
$(CC) -shared -o $@ $<

src/makefiles/Makefile.hpux

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
#ifdef ENFORCE_ALIGNMENT
3+
# CFLAGS_BE= -DNOFIXADE
4+
#else
5+
# HPUX_VERS:= $(shell uname -r)
6+
# HPUX_MAJOR= ${HPUX_VERS:R:E}
7+
# HPUX_MINOR= ${HPUX_VERS:E}
8+
# ifeq ($(HPUX_MAJOR), 08)
9+
# CFLAGS_BE+= +u -DHP_S500_ALIGN
10+
# LDFLAGS_BE+= +u
11+
# else
12+
# ifeq ($(HPUX_MAJOR), 09)
13+
# ifeq ($(CC), cc)
14+
# CFLAGS_BE+= +u4
15+
# LDFLAGS_BE+= +u4
16+
# endif
17+
# endif
18+
# endif
19+
#endif
20+
21+
%.sl: %.o
22+
$(LD) -b -o $@ $<
23+

src/makefiles/Makefile.i386_solaris

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
%.so: %.o
2+
$(LD) -G -Bdynamic -o $@ $<

src/makefiles/Makefile.irix5

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
# RANLIB is not used on IRIX 5
3+
RANLIB= touch
4+
5+
%.so: %.o
6+
$(LD) -G -Bdynamic -o $@ $< $(LDFLAGS)
7+

src/makefiles/Makefile.linux

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ifdef LINUX_ELF
2+
LDFLAGS+= -rdynamic
3+
endif
4+
MK_NO_LORDER= true
5+
6+
%.so: %.o
7+
$(CC) -shared -o $@ $<
8+

src/makefiles/Makefile.sparc_solaris

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
%.so: %.o
2+
$(LD) -G -Bdynamic -o $@ $<

src/makefiles/Makefile.sunos4

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
%.so: %.o
2+
$(LD) -dc -dp -Bdynamic -o $@ $<

src/makefiles/Makefile.svr4

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# MAKE_EXPORTS is required for svr4 loaders that want a file of
2+
# symbol names to tell them what to export/import.
3+
MAKE_EXPORTS= true
4+
5+
LDFLAGS+= /usr/ucblib/libucb.a -LD-Blargedynsym
6+
7+
%.so: %.o
8+
$(LD) -G -Bdynamic -o $@ $<
9+

src/makefiles/Makefile.ultrix4

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# install creates intermediate directories
2+
NO_BEFOREINSTL= true

src/makefiles/Makefile.univel

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#
2+
# The univel port is almost guaranteed NOT to work yet.
3+
#
4+
# MAKE_EXPORTS is required for svr4 loaders that want a file of
5+
# symbol names to tell them what to export/import.
6+
#MAKE_EXPORTS= true
7+
8+
%.so: %.o
9+
$(LD) -G -Bdynamic -o $@ $<
10+
11+
INSTALL= /usr/ucb/install
12+

0 commit comments

Comments
 (0)