Fix per-session activation of ALTER {ROLE|DATABASE} SET role.
[pgsql.git] / src / fe_utils / Makefile
blob2694be4b859f8d746677acbba726ce118b63d3bc
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-2024, 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 astreamer_file.o \
25 astreamer_gzip.o \
26 astreamer_lz4.o \
27 astreamer_tar.o \
28 astreamer_zstd.o \
29 cancel.o \
30 conditional.o \
31 connect_utils.o \
32 mbprint.o \
33 option_utils.o \
34 parallel_slot.o \
35 print.o \
36 psqlscan.o \
37 query_utils.o \
38 recovery_gen.o \
39 simple_list.o \
40 string_utils.o
42 ifeq ($(PORTNAME), win32)
43 override CPPFLAGS += -DFD_SETSIZE=1024
44 endif
46 all: libpgfeutils.a
48 libpgfeutils.a: $(OBJS)
49 rm -f $@
50 $(AR) $(AROPT) $@ $^
52 psqlscan.c: FLEXFLAGS = -Cfe -p -p
53 psqlscan.c: FLEX_NO_BACKUP=yes
54 psqlscan.c: FLEX_FIX_WARNING=yes
56 # libpgfeutils could be useful to contrib, so install it
57 install: all installdirs
58 $(INSTALL_STLIB) libpgfeutils.a '$(DESTDIR)$(libdir)/libpgfeutils.a'
60 installdirs:
61 $(MKDIR_P) '$(DESTDIR)$(libdir)'
63 uninstall:
64 rm -f '$(DESTDIR)$(libdir)/libpgfeutils.a'
66 clean distclean:
67 rm -f libpgfeutils.a $(OBJS) lex.backup
68 rm -f psqlscan.c