Makefile.in 1.59 KB
Newer Older
Marc G. Fournier's avatar
Marc G. Fournier committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#-------------------------------------------------------------------------
#
# Makefile--
#    Makefile for the port-specific subsystem of the backend
#
# You must invoke this make file with the PORTNAME variable set to the
# name of a port, i.e. the name of a subdirectory of the current directory.
# Example: 
#
#    make SUBSYS.o PORTNAME=linux
#
# We have two different modes of operation: 1) put stuff specific to Port X
# in subdirectory X and have that subdirectory's make file make it all, and 
# 2) use conditional statements in the present make file to include what's
# necessary for a specific port in our own output.  (1) came first, but (2)
# is superior for many things, like when the same thing needs to be done for
# multiple ports and you don't want to duplicate files in multiple 
# subdirectories.  Much of the stuff done via Method 1 today should probably
# be converted to Method 2.  
#
# IDENTIFICATION
22
#    $Header: /cvsroot/pgsql/src/backend/port/Attic/Makefile.in,v 1.2 1997/02/28 10:57:47 momjian Exp $
Marc G. Fournier's avatar
Marc G. Fournier committed
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
#
#-------------------------------------------------------------------------

include ../../Makefile.global

ifndef PORTNAME
.DEFAULT all: 
	@echo "Error:  Must invoke make with PORTNAME= argument."
	@false
else

OBJS = $(PORTNAME)/SUBSYS.o @INET_ATON@

all: submake SUBSYS.o

SUBSYS.o: $(OBJS)
	$(LD) -r -o SUBSYS.o $(OBJS)

.PHONY: submake clean dep

submake:
	$(MAKE) -C $(PORTNAME) SUBSYS.o

clean:
47
	rm -f SUBSYS.o $(OBJS)
Marc G. Fournier's avatar
Marc G. Fournier committed
48 49 50 51 52 53 54 55 56 57 58 59
	$(MAKE) -C $(PORTNAME) clean

depend dep:
	$(CC) -MM $(INCLUDE_OPT) *.c >depend
	$(MAKE) -C $(PORTNAME) $@

ifeq (depend,$(wildcard depend))
include depend
endif

endif