forked from g15ecb/shared-source-cli-2.0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile.common.in
98 lines (74 loc) · 2.56 KB
/
makefile.common.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# ==++==
#
#
# Copyright (c) 2006 Microsoft Corporation. All rights reserved.
#
# The use and distribution terms for this software are contained in the file
# named license.txt, which can be found in the root of this distribution.
# By using this software in any fashion, you are agreeing to be bound by the
# terms of this license.
#
# You must not remove this notice, or any other, from this software.
#
#
# ==--==
# ============================================================================
# File: Makefile.common
# Common included makefile for most of Rotor
# This should be included in a standard Makefile.in like this:
# TOP_SRC_DIR = @top_srcdir@
# include $(TOP_SRC_DIR)/makefile.common
# ============================================================================
SHELL = @SHELL@
# Build directory
# BSD make will cd into ./obj by default if it exists, which
# causes problems for our build system. We can prevent this
# by setting .OBJDIR.
.OBJDIR = .
VPATH = ../..:
# Directories
INCLUDE_DIRS = -I$(TOP_SRC_DIR)/pal/inc -I$(TOP_SRC_DIR)/palrt/inc \
-I$(NDPDIR)/clr/src/inc \
-I$(TOP_SRC_DIR)/palrt/idl
# Compiler information
CC = @CC@
CPP = @CPP@
CXX = @CXX@
CFLAGS = @CFLAGS@
CXXFLAGS = $(CFLAGS)
# Linker information
PAL_LIB = rotor_pal
LIB_PREFIX = lib
LIB_SUFFIX = @SHARED_LIB_EXTENSION@
PAL_LIB_FILE = $(LIB_PREFIX)$(PAL_LIB)$(LIB_SUFFIX)
ROTOR_LIBS = -l$(PAL_LIB)
LDFLAGS = -L$(_NTTREE)
GCC_LIB = @GCC_LIB@
LINKER_FLAGS = @LINKER_FLAGS@
NOSTDINC_FLAGS = @NOSTDINC_FLAGS@
LINKER_CC = @LINKER_CC@
LINKER_CXX = @LINKER_CXX@
# The C runtime static libraries that we need to get an application
# up and running.
REQUIRED_CRUNTIME = @REQUIRED_C_LIBS@
LINK_CC=$(LINKER_CC) $(LDFLAGS) $(LINKER_FLAGS) $(REQUIRED_CRUNTIME) -l$(PAL_LIB) $(GCC_LIB)
LINK_CXX=$(LINKER_CXX) $(LDFLAGS) $(LINKER_FLAGS) $(REQUIRED_CRUNTIME) -l$(PAL_LIB) $(GCC_LIB)
# Constants
BIGENDIAN = @BIGENDIAN@
PALDEFS = -DFEATURE_PAL -DPLATFORM_UNIX
# Additional suffix information
.SUFFIXES : .rc .satellite
# Resource compiler
RC = $(TOP_SRC_DIR)/tools/resourcecompiler/resourcecompiler
RC_INCLUDE_DIRS = /i$(TOP_SRC_DIR)/pal/inc /i$(TOP_SRC_DIR)/palrt/inc
# Other tools
BINPLACE = $(TOP_SRC_DIR)/tools/binplace/binplace
# Suffix mappings
.c.o:
$(CC) $(NOSTDINC_FLAGS) -c $(PALDEFS) $(BIGENDIAN) $(CFLAGS) \
$(LOCAL_CFLAGS) $(INCLUDE_DIRS) $(LOCAL_INCLUDE_DIRS) -o $@ $<
.cpp.o:
$(CXX) $(NOSTDINC_FLAGS) -c $(PALDEFS) $(BIGENDIAN) $(CXXFLAGS) \
$(LOCAL_CFLAGS) $(INCLUDE_DIRS) $(LOCAL_INCLUDE_DIRS) -o $@ $<
.rc.satellite:
$(RC) $(RC_INCLUDE_DIRS) $<