blob: 0aeb56a73425b303d87a1d86f43ddbd000dd61cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
#-------------------------------------------------------------------------
#
# Makefile for src/bin/pgtclsh
# (a tclsh workalike with pgtcl commands installed)
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.28 2000/06/27 00:31:40 petere Exp $
#
#-------------------------------------------------------------------------
subdir = src/bin/pgtclsh
top_builddir = ../../..
include ../../Makefile.global
#
# Include definitions from the tclConfig.sh file
#
include Makefile.tcldefs
ifeq ($(USE_TK), true)
include Makefile.tkdefs
endif
CFLAGS+= $(X_CFLAGS) -I$(LIBPGTCLDIR)
# If we are here then TCL is available
PROGRAMS = pgtclsh
# Add TK targets if TK is available
ifeq ($(USE_TK), true)
PROGRAMS += pgtksh
endif
all: submake $(PROGRAMS)
pgtclsh: pgtclAppInit.o
$(CC) $(CFLAGS) $(TCL_DEFS) -o $@ $< \
$(LIBPGTCL) $(LIBPQ) $(TCL_LIB_SPEC) $(TCL_LIBS) $(LDFLAGS)
pgtksh: pgtkAppInit.o
$(CC) $(CFLAGS) $(TK_DEFS) -o $@ $< \
$(LIBPGTCL) $(LIBPQ) $(X_LIBS) $(TK_LIB_SPEC) $(TK_LIBS) \
$(TCL_LIB_SPEC) $(X11_LIBS) $(LDFLAGS)
.PHONY: submake
submake:
$(MAKE) -C $(LIBPGTCLDIR) all
install: all installdirs
$(INSTALL_PROGRAM) pgtclsh $(bindir)/pgtclsh
ifeq ($(USE_TK), true)
$(INSTALL_PROGRAM) pgtksh $(bindir)/pgtksh
endif
installdirs:
$(mkinstalldirs) $(bindir)
uninstall:
rm -f $(bindir)/pgtclsh $(bindir)/pgtksh
Makefile.tcldefs: mkMakefile.tcldefs.sh
$(SHELL) $<
Makefile.tkdefs: mkMakefile.tkdefs.sh
$(SHELL) $<
mkMakefile.tcldefs.sh mkMakefile.tkdefs.sh: $(top_builddir)/config.status
mkMakefile.tcldefs.sh mkMakefile.tkdefs.sh: % : %.in
cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
clean:
rm -f *.o Makefile.tcldefs Makefile.tkdefs pgtclsh pgtksh
distclean maintainer-clean: clean
rm -f mkMakefile.tcldefs.sh mkMakefile.tkdefs.sh
dep depend:
$(CC) -MM $(CFLAGS) *.c > depend
|