mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
Continuation of make file simplification; handle libpq.a dependancy.
This commit is contained in:
parent
c5c8983ef7
commit
31e8156fad
@ -7,16 +7,19 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.7 1996/11/01 01:46:55 momjian Exp $
|
# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.8 1996/11/02 09:53:15 bryanh Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
PROG= psql
|
SRCDIR = ../..
|
||||||
|
LIBPQDIR = $(SRCDIR)/libpq
|
||||||
|
include ../../Makefile.global
|
||||||
|
|
||||||
MKDIR= ../../mk
|
INCLUDE_OPT := \
|
||||||
include $(MKDIR)/postgres.mk
|
-I$(LIBPQDIR) \
|
||||||
include ../Makefile.global
|
-I$(SRCDIR)/include
|
||||||
|
|
||||||
|
CFLAGS += $(INCLUDE_OPT)
|
||||||
#
|
#
|
||||||
#USE_READLINE is set in Makefile.global
|
#USE_READLINE is set in Makefile.global
|
||||||
#
|
#
|
||||||
@ -24,11 +27,6 @@ include ../Makefile.global
|
|||||||
ifeq ($(USE_READLINE), true)
|
ifeq ($(USE_READLINE), true)
|
||||||
CFLAGS += $(READLINE_INC) $(HISTORY_INC)
|
CFLAGS += $(READLINE_INC) $(HISTORY_INC)
|
||||||
|
|
||||||
# if you are using an older readline that uses #include "readline.h" instead
|
|
||||||
# of #include <readline/readline.h>,
|
|
||||||
# uncomment this
|
|
||||||
# CFLAGS += -DOLD_READLINE
|
|
||||||
|
|
||||||
LIBCURSES= -lcurses
|
LIBCURSES= -lcurses
|
||||||
LD_ADD += $(READLINE_LIB) $(HISTORY_LIB) $(LIBCURSES)
|
LD_ADD += $(READLINE_LIB) $(HISTORY_LIB) $(LIBCURSES)
|
||||||
|
|
||||||
@ -59,14 +57,32 @@ else
|
|||||||
CFLAGS += -DNOREADLINE
|
CFLAGS += -DNOREADLINE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SRCS= psql.c stringutils.c
|
OBJS= psql.o stringutils.o
|
||||||
|
|
||||||
ifneq ($(USE_READLINE), true)
|
ifneq ($(USE_READLINE), true)
|
||||||
SRCS+= rlstubs.c
|
OBJS+= rlstubs.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(MKDIR)/postgres.prog.mk
|
all: psql
|
||||||
|
|
||||||
|
psql: $(OBJS) $(LIBPQDIR)/libpq.a
|
||||||
|
$(CC) $(LDFLAGS) -o psql -L$(LIBPQDIR) $(OBJS) -lpq $(LD_ADD)
|
||||||
|
|
||||||
|
$(srcdir)/libpq/libpq.a:
|
||||||
|
$(MAKE) -C $(LIBPQDIR) libpq.a
|
||||||
|
|
||||||
|
install:
|
||||||
|
$(INSTALL) $(INSTL_EXE_OPTS) psql $(DESTDIR)$(BINDIR)/psql
|
||||||
|
|
||||||
|
depend dep:
|
||||||
|
$(CC) -MM $(INCLUDE_OPT) *.c >depend
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f psql $(OBJS)
|
||||||
|
|
||||||
|
ifeq (depend,$(wildcard depend))
|
||||||
|
include depend
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user