]> granicus.if.org Git - postgresql/blob - src/backend/port/Makefile
pgindent run for release 9.3
[postgresql] / src / backend / port / Makefile
1 #-------------------------------------------------------------------------
2 #
3 # Makefile--
4 #    Makefile for the port-specific subsystem of the backend
5 #
6 # We have two different modes of operation: 1) put stuff specific to Port X
7 # in subdirectory X and have that subdirectory's make file make it all, and
8 # 2) use conditional statements in the present make file to include what's
9 # necessary for a specific port in our own output.  (1) came first, but (2)
10 # is superior for many things, like when the same thing needs to be done for
11 # multiple ports and you don't want to duplicate files in multiple
12 # subdirectories.  Much of the stuff done via Method 1 today should probably
13 # be converted to Method 2.
14 #
15 # IDENTIFICATION
16 #    src/backend/port/Makefile
17 #
18 #-------------------------------------------------------------------------
19
20 subdir = src/backend/port
21 top_builddir = ../../..
22 include $(top_builddir)/src/Makefile.global
23
24 OBJS = dynloader.o pg_sema.o pg_shmem.o pg_latch.o $(TAS)
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
34
35 tas.o: tas.s
36 ifeq ($(SUN_STUDIO_CC), yes)
37 # preprocess assembler file with cpp
38         $(CC) $(CFLAGS) -c -P $<
39         mv $*.i $*_cpp.s
40         $(CC) $(CFLAGS) -c $*_cpp.s -o $@
41 else
42         $(CC) $(CFLAGS) -c $<
43 endif
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