forked from jarsy/bcm-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.unix-common
77 lines (64 loc) · 2.24 KB
/
Makefile.unix-common
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
# $Id: Makefile.unix-common,v 1.15 Broadcom SDK $
# $Copyright: (c) 2016 Broadcom.
# Broadcom Proprietary and Confidential. All rights reserved.$
#
# This file contains the platform-independent portion of the Makefiles
# for Unix compilation.
#
#
# TARGETTYPE Defines: This defines the type of system you are compiling
# the driver for. New values can be created by porting the code to your
# platform and adding the define in this Makefile.
#
TARGETTYPE = PLISIM
# Configuration Variable
# OSType Defines: This defines the type of RTOS or microkernel which you
# are compiling the SAL (and its associated driver) for. New platforms
# can be created by porting the code to your platform and changing the
# define in this Makefile.
OSTYPE = UNIX
#
# ORIGIN is used to Optionally select different CFLAGS. It is used to import
# source from other vendors. If SOURCE=Broadcom, then the BCM_ flags are added
# to those passed to the compiler. If SOURCE != Broadcom, BCM_ flags are NOT
# added.
#
# Default specifies Broadcom
#
ifndef ORIGIN
ORIGIN = Broadcom
endif
#
# STD_{C|CPP|CXX}FLAGS - Standard flags used by ALL compilations
# BCM_{C|CPP|CXX}FLAGS - Flags used for Broadcom source files
# OPT_{C|CPP|CXX}FLAGS - Defined in local make files BEFORE inclusion of
# this Makefile, to define local "Extra" flags.
#
STD_CFLAGS = -D_REENTRANT -D${TARGETTYPE} -D${OSTYPE} ${CFGFLAGS} \
${ENDIAN_DEF}
STD_CPPFLAGS = ${STD_CFLAGS}
STD_CXXFLAGS = ${STD_CFLAGS}
BCM_CFLAGS = -Wall -Werror ${BCM_EXTRA_CC_CFLAGS}
BCM_CPPFLAGS = ${BCM_CFLAGS}
BCM_CXXFLAGS = ${BCM_CFLAGS}
ifeq (${ORIGIN}, Broadcom)
CFLAGS += ${STD_CFLAGS} ${BCM_CFLAGS} ${OPT_CFLAGS}
CPPFLAGS += ${STD_CPPFLAGS} ${BCM_CPPFLAGS} ${OPT_CPPFLAGS}
CXXFLAGS += ${STD_CXXFLAGS} ${BCM_CXXFLAGS} ${OPT_CXXFLAGS}
else
CFLAGS += ${STD_CFLAGS} ${OPT_CFLAGS}
CPPFLAGS += ${STD_CPPFLAGS} ${OPT_CPPFLAGS}
CXXFLAGS += ${STD_CXXFLAGS} ${OPT_CXXFLAGS}
endif
#
# Add flags required for running on unix.
#
LDFLAGS += ${LIBS}
#
# DEPEND is used as a command to generate the list of dependencies.
# The format of the output must be
# "file.o : file.c a/b/c.h d/e/f.h ...",
# if it is on multiple lines, each line must end in a backslash.
# The output MUST be on standard out.
#
DEPEND = ${CC} -M -P $(CFLAGS) $<