1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Make all commands that link a program look like

$(CC) $(CFLAGS) $(LDFLAGS) <object files> <extra-libraries> $(LIBS) -o $@

This form seemed to be the most portable, readable, and logical, but in any
case it's better than having a dozen different ones in the tree.
This commit is contained in:
Peter Eisentraut
2000-11-30 20:36:13 +00:00
parent 309112267f
commit e5ba2fc5b5
16 changed files with 47 additions and 43 deletions

View File

@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.67 2000/10/20 21:03:39 petere Exp $
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.68 2000/11/30 20:36:10 petere Exp $
#
#-------------------------------------------------------------------------
@@ -37,7 +37,7 @@ all: postgres $(POSTGRES_IMP)
ifneq ($(PORTNAME), win)
postgres: $(OBJS)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(export_dynamic)
$(CC) $(CFLAGS) $(LDFLAGS) $(export_dynamic) $^ $(LIBS) -o $@
else # win
@@ -80,7 +80,7 @@ $(top_builddir)/src/utils/dllinit.o: $(top_srcdir)/src/utils/dllinit.c
# The postgres.o target is needed by the rule in Makefile.global that
# creates the exports file when MAKE_EXPORTS = true.
postgres.o: $(OBJS)
$(CC) $(LDREL) $(LDOUT) $@ $^ $(LDFLAGS)
$(CC) $(LDREL) $(LDFLAGS) $^ $(LIBS) -o $@
# The following targets are specified in make commands that appear in
@@ -193,7 +193,7 @@ maintainer-clean: distclean
# are up to date. It saves the time of doing all the submakes.
.PHONY: quick
quick: $(OBJS)
$(CC) -o postgres $(OBJS) $(LDFLAGS) $(export_dynamic)
$(CC) $(CFLAGS) $(LDFLAGS) $(export_dynamic) $^ $(LIBS) -o postgres
depend dep: $(top_srcdir)/src/include/parser/parse.h $(top_builddir)/src/include/utils/fmgroids.h
for i in $(DIRS); do $(MAKE) -C $$i $@; done

View File

@@ -4,7 +4,7 @@
# Makefile for regex
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/regex/Makefile,v 1.15 2000/10/20 21:03:46 petere Exp $
# $Header: /cvsroot/pgsql/src/backend/regex/Makefile,v 1.16 2000/11/30 20:36:10 petere Exp $
#
#-------------------------------------------------------------------------
@@ -28,7 +28,7 @@ SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
retest: retest.o SUBSYS.o $(DEBUGOBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend

View File

@@ -4,7 +4,7 @@
# Makefile for utils/mb
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/utils/mb/Makefile,v 1.14 2000/10/30 10:40:28 ishii Exp $
# $Header: /cvsroot/pgsql/src/backend/utils/mb/Makefile,v 1.15 2000/11/30 20:36:11 petere Exp $
#
#-------------------------------------------------------------------------
@@ -22,13 +22,13 @@ SUBSYS.o: $(OBJS)
utftest.o: utftest.c conv.c wchar.c mbutils.c
sjistest: sjistest.o palloc.o common.o mbutils.o wchar.o wstrcmp.o wstrncmp.o big5.o
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
liketest: liketest.o palloc.o $(OBJS)
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
utftest: utftest.o palloc.o common.o wstrcmp.o wstrncmp.o big5.o
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend