44# Makefile for utils
55#
66# IDENTIFICATION
7- # $Header: /cvsroot/pgsql/src/utils/Attic/Makefile,v 1.6 1999/01/17 06:20:03 momjian Exp $
7+ # $Header: /cvsroot/pgsql/src/utils/Attic/Makefile,v 1.7 2000/02/27 01:18:46 tgl Exp $
88#
99# About strdup: Some systems have strdup in their standard library, others
1010# don't. Ones that don't will use this make file to compile the strdup.c
1313# because the strdup.c in this directory may conflict with the strdup()
1414# prototype from the system library and cause a compile error.
1515#
16+ # getopt.o is likewise built only on request.
17+ #
18+ # dllinit.o is only built on Win32 platform.
19+ #
1620# -------------------------------------------------------------------------
1721
1822SRCDIR = ..
19- include .. /Makefile.global
23+ include $( SRCDIR ) /Makefile.global
2024
2125all : version.o
2226
@@ -26,10 +30,11 @@ depend dep:
2630$(CC ) $(CFLAGS ) -MM* .c> depend
2731
2832clean :
29- rm -f version.o
30- ifeq ($(PORTNAME ) , win)
31- rm -f dllinit.o
32- endif
33+ rm -f dllinit.o getopt.o strdup.o version.o
34+
35+ # Make sure version.o has proper dependency on version.h,
36+ # even if we didn't do make depend.
37+ version.o : version.c$(SRCDIR ) /include/version.h
3338
3439ifeq (depend,$(wildcard depend) )
3540include depend