OSDN Git Service

- extend conditional for use of -ltermcap in bsdi/bsdi_2_1 compiles
[pg-rex/syncrep.git] / src / bin / psql / Makefile
1 #-------------------------------------------------------------------------
2 #
3 # Makefile.inc--
4 #    Makefile for bin/psql
5 #
6 # Copyright (c) 1994, Regents of the University of California
7 #
8 #
9 # IDENTIFICATION
10 #    $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.3 1996/07/20 07:40:03 scrappy Exp $
11 #
12 #-------------------------------------------------------------------------
13
14 PROG= psql
15
16 MKDIR=  ../../mk
17 include $(MKDIR)/postgres.mk
18 include ../Makefile.global
19
20 #
21 #USE_READLINE is set in Makefile.global
22
23
24 ifeq ($(USE_READLINE), true)
25    CFLAGS += -I$(READLINE_INCDIR) -I$(HISTORY_INCDIR)
26
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
32    LIBCURSES=   -lcurses 
33    LD_ADD += -L$(READLINE_LIBDIR) -L$(HISTORY_LIBDIR) -lreadline -lhistory $(LIBCURSES)
34 # use the following if your readline has no separate history lib
35 #   LD_ADD += -L$(READLINE_LIBDIR) -lreadline $(LIBCURSES)
36
37    ifeq ($(PORTNAME), ultrix4)
38    LD_ADD += -ltermcap
39    else
40    ifeq ($(PORTNAME), sparc)
41    LD_ADD += -ltermcap
42    else
43    ifeq ($(PORTNAME), linux)
44    LD_ADD += -ltermcap
45    endif
46    ifeq ($(PORTNAME), next)
47    LD_ADD += -ltermcap
48    ifeq ($(PORTNAME), bsdi)
49    LD_ADD += -ltermcap
50    ifeq ($(PORTNAME), bsdi_2_1)
51    LD_ADD += -ltermcap
52    endif
53    endif
54    endif
55    endif
56    endif
57 else
58    CFLAGS += -DNOREADLINE
59 endif
60
61 SRCS= psql.c stringutils.c 
62
63 ifneq ($(USE_READLINE), true)
64 SRCS+= rlstubs.c
65 endif
66
67 include $(MKDIR)/postgres.prog.mk
68
69
70
71