Makefile 2.0 KB
Newer Older
M
Marc G. Fournier 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#-------------------------------------------------------------------------
#
# Makefile--
#    Makefile for the port-specific subsystem of the backend
#
# 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
B
Bruce Momjian 已提交
16
#    $Header: /cvsroot/pgsql/src/backend/port/Makefile,v 1.17 2002/07/19 17:35:11 momjian Exp $
M
Marc G. Fournier 已提交
17 18 19
#
#-------------------------------------------------------------------------

20 21 22
subdir = src/backend/port
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
M
Marc G. Fournier 已提交
23

B
Bruce Momjian 已提交
24 25 26 27 28
OBJS=$(GETHOSTNAME) $(GETRUSAGE) $(INET_ATON) $(ISINF) $(MEMCMP) \
        $(MISSING_RANDOM) $(QSORT) $(SNPRINTF) $(SRANDOM) $(STRCASECMP) \
	$(STRDUP) $(STRERROR) $(STRTOL) $(STRTOUL)

OBJS+=dynloader.o pg_sema.o pg_shmem.o
P
Move  
Peter Eisentraut 已提交
29

30
OBJS+=$(DLLINIT)
P
Move  
Peter Eisentraut 已提交
31

32
OBJS+=$(TAS)
P
Move  
Peter Eisentraut 已提交
33

34
ifeq ($(PORTNAME), qnx4)
35
OBJS+=getrusage.o qnx4/SUBSYS.o
36
endif
37
ifeq ($(PORTNAME), beos)
38
OBJS+=beos/SUBSYS.o
39
endif
40
ifeq ($(PORTNAME), darwin)
41
OBJS+=darwin/SUBSYS.o
42 43
endif

44
all: SUBSYS.o
M
Marc G. Fournier 已提交
45 46

SUBSYS.o: $(OBJS)
P
Move  
Peter Eisentraut 已提交
47
	$(LD) $(LDREL) $(LDOUT) $@ $^
M
Marc G. Fournier 已提交
48

49 50 51 52 53
qnx4/SUBSYS.o: qnx4.dir

qnx4.dir:
	$(MAKE) -C qnx4 all

P
Peter Eisentraut 已提交
54 55 56
beos/SUBSYS.o: beos.dir

beos.dir:
57 58
	$(MAKE) -C beos all

59 60 61 62 63
darwin/SUBSYS.o: darwin.dir

darwin.dir:
	$(MAKE) -C darwin all

B
Bruce Momjian 已提交
64
tas.o: tas.s
65
	$(CC) $(CFLAGS) -c $<
B
Bruce Momjian 已提交
66

67 68 69 70
# IPC test program
ipc_test: ipc_test.o pg_sema.o pg_shmem.o $(MEMCMP) $(SNPRINTF) $(STRERROR)
	$(CC) $(CFLAGS) $(LDFLAGS) $(export_dynamic) $^ $(LIBS) -o $@

71
distclean clean:
72
	rm -f SUBSYS.o $(OBJS) ipc_test ipc_test.o
73 74 75
	$(MAKE) -C beos clean
	$(MAKE) -C darwin clean
	$(MAKE) -C qnx4 clean