Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit31e8156

Browse files
author
Bryan Henderson
committed
Continuation of make file simplification; handle libpq.a dependancy.
1 parentc5c8983 commit31e8156

File tree

1 file changed

+29
-13
lines changed

1 file changed

+29
-13
lines changed

‎src/bin/psql/Makefile

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,26 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.7 1996/11/01 01:46:55 momjian Exp $
10+
# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.8 1996/11/02 09:53:15 bryanh Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

14-
PROG= psql
14+
SRCDIR = ../..
15+
LIBPQDIR =$(SRCDIR)/libpq
16+
include ../../Makefile.global
1517

16-
MKDIR=../../mk
17-
include$(MKDIR)/postgres.mk
18-
include ../Makefile.global
18+
INCLUDE_OPT :=\
19+
-I$(LIBPQDIR)\
20+
-I$(SRCDIR)/include
1921

22+
CFLAGS +=$(INCLUDE_OPT)
2023
#
2124
#USE_READLINE is set in Makefile.global
2225
#
2326

2427
ifeq ($(USE_READLINE), true)
2528
CFLAGS +=$(READLINE_INC)$(HISTORY_INC)
2629

27-
# if you are using an older readline that uses #include "readline.h" instead
28-
# of #include <readline/readline.h>,
29-
# uncomment this
30-
# CFLAGS += -DOLD_READLINE
31-
3230
LIBCURSES=-lcurses
3331
LD_ADD +=$(READLINE_LIB)$(HISTORY_LIB)$(LIBCURSES)
3432

@@ -59,14 +57,32 @@ else
5957
CFLAGS += -DNOREADLINE
6058
endif
6159

62-
SRCS= psql.c stringutils.c
60+
OBJS= psql.o stringutils.o
6361

6462
ifneq ($(USE_READLINE), true)
65-
SRCS+= rlstubs.c
63+
OBJS+= rlstubs.o
6664
endif
6765

68-
include$(MKDIR)/postgres.prog.mk
66+
all: psql
67+
68+
psql:$(OBJS)$(LIBPQDIR)/libpq.a
69+
$(CC)$(LDFLAGS) -o psql -L$(LIBPQDIR)$(OBJS) -lpq$(LD_ADD)
70+
71+
$(srcdir)/libpq/libpq.a:
72+
$(MAKE) -C$(LIBPQDIR) libpq.a
73+
74+
install:
75+
$(INSTALL)$(INSTL_EXE_OPTS) psql$(DESTDIR)$(BINDIR)/psql
6976

77+
dependdep:
78+
$(CC) -MM$(INCLUDE_OPT)*.c>depend
79+
80+
clean:
81+
rm -f psql$(OBJS)
82+
83+
ifeq (depend,$(wildcard depend))
84+
include depend
85+
endif
7086

7187

7288

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp