# Makefile for utils/misc
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/utils/misc/Makefile,v 1.5 1997/12/20 00:29:12 scrappy Exp $
+# src/backend/utils/misc/Makefile
#
#-------------------------------------------------------------------------
-SRCDIR = ../../..
-include ../../../Makefile.global
+subdir = src/backend/utils/misc
+top_builddir = ../../../..
+include $(top_builddir)/src/Makefile.global
-INCLUDE_OPT = -I../..
+override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS)
-CFLAGS += $(INCLUDE_OPT)
+OBJS = guc.o help_config.o pg_rusage.o ps_status.o rbtree.o \
+ superuser.o timeout.o tzparser.o
-OBJS = database.o superuser.o
-
-all: SUBSYS.o
-
-SUBSYS.o: $(OBJS)
- $(LD) -r -o SUBSYS.o $(OBJS)
+# This location might depend on the installation directories. Therefore
+# we can't subsitute it into pg_config.h.
+ifdef krb_srvtab
+override CPPFLAGS += -DPG_KRB_SRVTAB='"$(krb_srvtab)"'
+endif
-depend dep:
- $(CC) -MM $(INCLUDE_OPT) *.c >depend
+include $(top_srcdir)/src/backend/common.mk
-clean:
- rm -f SUBSYS.o $(OBJS)
+# guc-file is compiled as part of guc
+guc.o: guc-file.c
-ifeq (depend,$(wildcard depend))
-include depend
+guc-file.c: guc-file.l
+ifdef FLEX
+ $(FLEX) $(FLEXFLAGS) -o'$@' $<
+else
+ @$(missing) flex $< $@
endif
+# Note: guc-file.c is not deleted by 'make clean',
+# since we want to ship it in distribution tarballs.
+clean:
+ @rm -f lex.yy.c