Makefile 1.6 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
16
#    $PostgreSQL: pgsql/src/backend/port/Makefile,v 1.29 2010/09/11 15:48:04 heikki 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

24
OBJS = dynloader.o pg_sema.o pg_shmem.o pg_latch.o $(TAS)
P
Move  
Peter Eisentraut 已提交
25

26
ifeq ($(PORTNAME), darwin)
27
SUBDIRS += darwin
28
endif
29
ifeq ($(PORTNAME), win32)
30
SUBDIRS += win32
31
endif
32

33
include $(top_srcdir)/src/backend/common.mk
M
Marc G. Fournier 已提交
34

B
Bruce Momjian 已提交
35
tas.o: tas.s
36 37
ifeq ($(SUN_STUDIO_CC), yes)
# preprocess assembler file with cpp
38 39 40 41
	$(CC) $(CFLAGS) -c -P $<
	mv $*.i $*_cpp.s
	$(CC) $(CFLAGS) -c $*_cpp.s -o $@
else
42
	$(CC) $(CFLAGS) -c $<
43
endif
B
Bruce Momjian 已提交
44

45
# IPC test program
46
ipc_test: ipc_test.o pg_sema.o pg_shmem.o
47
	$(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) $(export_dynamic) $^ $(LIBS) -o $@
48

49
distclean clean:
50
	rm -f ipc_test ipc_test.o tas_cpp.s
51
	$(MAKE) -C darwin clean
52
	$(MAKE) -C win32 clean