Makefile 1.7 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.25 2008/02/19 10:30:07 petere 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
OBJS+=dynloader.o pg_sema.o pg_shmem.o
P
Move  
Peter Eisentraut 已提交
25

26
OBJS+=$(TAS)
P
Move  
Peter Eisentraut 已提交
27

28
ifeq ($(PORTNAME), darwin)
29
OBJS+=darwin/SUBSYS.o
30
endif
31 32 33
ifeq ($(PORTNAME), win32)
OBJS+=win32/SUBSYS.o
endif
34

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

37 38 39 40 41
darwin/SUBSYS.o: darwin.dir

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

42 43 44 45 46
win32/SUBSYS.o: win32.dir

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

B
Bruce Momjian 已提交
47
tas.o: tas.s
48
ifeq ($(PORTNAME), solaris)
49
# preprocess assembler file with cpp, used by x86
50 51 52 53
	$(CC) $(CFLAGS) -c -P $<
	mv $*.i $*_cpp.s
	$(CC) $(CFLAGS) -c $*_cpp.s -o $@
else
54
	$(CC) $(CFLAGS) -c $<
55
endif
B
Bruce Momjian 已提交
56

57
# IPC test program
58
ipc_test: ipc_test.o pg_sema.o pg_shmem.o
59 60
	$(CC) $(CFLAGS) $(LDFLAGS) $(export_dynamic) $^ $(LIBS) -o $@

61
distclean clean:
62
	rm -f ipc_test ipc_test.o tas_cpp.s
63
	$(MAKE) -C darwin clean
64
	$(MAKE) -C win32 clean