Fix indentation in twophase.c
[pgsql.git] / src / fe_utils / Makefile
blob456d6dd3904e100a8fd4ef27c894f4075c6b8761
1 #-------------------------------------------------------------------------
3 # Makefile for src/fe_utils
5 # This makefile generates a static library, libpgfeutils.a,
6 # for use by client applications
8 # Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
9 # Portions Copyright (c) 1994, Regents of the University of California
11 # IDENTIFICATION
12 # src/fe_utils/Makefile
14 #-------------------------------------------------------------------------
16 subdir = src/fe_utils
17 top_builddir = ../..
18 include $(top_builddir)/src/Makefile.global
20 override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
22 OBJS = \
23 archive.o \
24 cancel.o \
25 conditional.o \
26 connect_utils.o \
27 mbprint.o \
28 option_utils.o \
29 parallel_slot.o \
30 print.o \
31 psqlscan.o \
32 query_utils.o \
33 recovery_gen.o \
34 simple_list.o \
35 string_utils.o
37 ifeq ($(PORTNAME), win32)
38 override CPPFLAGS += -DFD_SETSIZE=1024
39 endif
41 all: libpgfeutils.a
43 libpgfeutils.a: $(OBJS)
44 rm -f $@
45 $(AR) $(AROPT) $@ $^
47 psqlscan.c: FLEXFLAGS = -Cfe -p -p
48 psqlscan.c: FLEX_NO_BACKUP=yes
49 psqlscan.c: FLEX_FIX_WARNING=yes
51 distprep: psqlscan.c
53 # libpgfeutils could be useful to contrib, so install it
54 install: all installdirs
55 $(INSTALL_STLIB) libpgfeutils.a '$(DESTDIR)$(libdir)/libpgfeutils.a'
57 installdirs:
58 $(MKDIR_P) '$(DESTDIR)$(libdir)'
60 uninstall:
61 rm -f '$(DESTDIR)$(libdir)/libpgfeutils.a'
63 clean distclean:
64 rm -f libpgfeutils.a $(OBJS) lex.backup
66 # psqlscan.c is supposed to be in the distribution tarball,
67 # so do not clean it in the clean/distclean rules
68 maintainer-clean: distclean
69 rm -f psqlscan.c