]> granicus.if.org Git - postgresql/blob - src/bin/pg_config/Makefile
Update CVS HEAD for 2007 copyright. Back branches are typically not
[postgresql] / src / bin / pg_config / Makefile
1 #-------------------------------------------------------------------------
2 #
3 # Makefile for src/bin/pg_config
4 #
5 # Copyright (c) 1998-2007, PostgreSQL Global Development Group
6 #
7 # $PostgreSQL: pgsql/src/bin/pg_config/Makefile,v 1.18 2007/01/05 22:19:48 momjian Exp $
8 #
9 #-------------------------------------------------------------------------
10
11 PGFILEDESC = "pg_config - report configuration information"
12 subdir = src/bin/pg_config
13 top_builddir = ../../..
14 include $(top_builddir)/src/Makefile.global
15
16 OBJS=   pg_config.o $(WIN32RES)
17
18 # don't include subdirectory-path-dependent -I and -L switches
19 STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS))
20 STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/port,$(LDFLAGS))
21
22 override CPPFLAGS += -DFRONTEND
23 override CPPFLAGS += -DVAL_CONFIGURE="\"$(configure_args)\""
24 override CPPFLAGS += -DVAL_CC="\"$(CC)\""
25 override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\""
26 override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\""
27 override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\""
28 override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\""
29 override CPPFLAGS += -DVAL_LDFLAGS_SL="\"$(LDFLAGS_SL)\""
30 override CPPFLAGS += -DVAL_LIBS="\"$(LIBS)\""
31
32 all: submake-libpgport pg_config
33
34 pg_config: $(OBJS)
35         $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) -o $@$(X)
36
37 install: all installdirs
38         $(INSTALL_SCRIPT) pg_config$(X) '$(DESTDIR)$(bindir)/pg_config$(X)'
39
40 installdirs:
41         $(mkinstalldirs) '$(DESTDIR)$(bindir)'
42
43 uninstall:
44         rm -f '$(DESTDIR)$(bindir)/pg_config$(X)'
45
46 clean distclean maintainer-clean:
47         rm -f pg_config$(X) $(OBJS)