34
34
#
35
35
#
36
36
# IDENTIFICATION
37
- # $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.42 1999/12/16 01:25:00 momjian Exp $
37
+ # $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.43 2000/02/27 01:26:12 tgl Exp $
38
38
#
39
39
# -------------------------------------------------------------------------
40
40
41
41
SRCDIR = ..
42
- include .. /Makefile.global
42
+ include $( SRCDIR ) /Makefile.global
43
43
44
44
DIRS = access bootstrap catalog commands executor lib libpq \
45
45
main parser nodes optimizer port postmaster regex rewrite \
@@ -55,6 +55,8 @@ ifeq ($(PORTNAME), qnx4)
55
55
OBJS1 = bootstrap/bootstrap.o
56
56
endif
57
57
58
+ VERSIONOBJ = $(SRCDIR ) /utils/version.o
59
+
58
60
# kerberos flags
59
61
60
62
ifdef KRBVERS
@@ -63,25 +65,24 @@ LDFLAGS+= $(KRBLIBS)
63
65
endif
64
66
65
67
ifeq ($(MAKE_DLL ) , true)
66
- DLLOBJS =$(OBJS )
67
- DLLOBJS+ = ../utils/version.o
68
+ DLLOBJS = $(OBJS ) $(VERSIONOBJ )
68
69
DLLLIBS = -L/usr/local/lib -lcygipc -lcrypt -lcygwin -lkernel32
69
70
70
71
postgres.def : $(DLLOBJS )
71
72
$(DLLTOOL ) --export-all --output-def $@ $(DLLOBJS )
72
73
73
- libpostgres.a : $(DLLOBJS ) .. /utils/dllinit.o postgres.def
74
+ libpostgres.a : $(DLLOBJS ) $( SRCDIR ) /utils/dllinit.o postgres.def
74
75
$(DLLTOOL ) --dllname postgres.exe --def postgres.def --output-lib $@
75
76
endif
76
77
77
78
all : postgres $(POSTGRES_IMP ) global1.bki.source local1_template1.bki.source \
78
79
global1.description local1_template1.description
79
80
80
81
ifneq ($(PORTNAME ) , win)
81
- postgres : fmgr.h $(OBJS ) ../utils/version.o
82
- $(CC ) -o postgres $(OBJS ) $(OBJS1 ) ../utils/version.o $(LDFLAGS )
82
+ postgres : fmgr.h $(OBJS ) $( VERSIONOBJ )
83
+ $(CC ) -o postgres $(OBJS ) $(OBJS1 ) $( VERSIONOBJ ) $(LDFLAGS )
83
84
else
84
- postgres : $(DLLOBJS ) .. /utils/dllinit.o postgres.def libpostgres.a
85
+ postgres : $(DLLOBJS ) $( SRCDIR ) /utils/dllinit.o postgres.def libpostgres.a
85
86
dlltool --dllname $@ $(X ) --output-exp $@ .exp --def postgres.def
86
87
gcc -g -o $@ $(X ) -Wl,--base-file,$@ .base $@ .exp $(DLLOBJS ) $(DLLLIBS )
87
88
dlltool --dllname $@ $(X ) --base-file $@ .base --output-exp $@ .exp --def postgres.def
@@ -96,11 +97,11 @@ $(OBJS): $(DIRS:%=%.dir)
96
97
$(DIRS:% =%.dir):
97
98
$(MAKE) -C $(subst .dir,,$@) all
98
99
99
- .. /utils/version.o :
100
- $(MAKE ) -C .. /utils version.o
100
+ $( VERSIONOBJ ) : $( SRCDIR ) /utils/version.c $( SRCDIR ) /include/version.h
101
+ $(MAKE ) -C $( SRCDIR ) /utils version.o
101
102
102
- .. /utils/dllinit.c:
103
- $(MAKE ) -C .. /utils dllinit.o
103
+ $( SRCDIR ) /utils/dllinit.o : $( SRCDIR ) /utils/dllinit.c
104
+ $(MAKE ) -C $( SRCDIR ) /utils dllinit.o
104
105
105
106
global1.bki.source local1_template1.bki.source \
106
107
global1.description local1_template1.description : catalog/$@
0 commit comments