]> CyberLeo.Net >> Repos - FreeBSD/releng/8.2.git/blob - sys/contrib/octeon-sdk/cvmx.mk
Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.
[FreeBSD/releng/8.2.git] / sys / contrib / octeon-sdk / cvmx.mk
1 #/***********************license start***************
2 # Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights
3 # reserved.
4 #
5 #
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are
8 # met:
9 #
10 #     * Redistributions of source code must retain the above copyright
11 #       notice, this list of conditions and the following disclaimer.
12 #
13 #     * Redistributions in binary form must reproduce the above
14 #       copyright notice, this list of conditions and the following
15 #       disclaimer in the documentation and/or other materials provided
16 #       with the distribution.
17 #
18 #     * Neither the name of Cavium Networks nor the names of
19 #       its contributors may be used to endorse or promote products
20 #       derived from this software without specific prior written
21 #       permission.
22 #
23 # TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
24 # AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
25 # OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
26 # RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
27 # REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
28 # DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
29 # OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
30 # PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
31 # POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
32 # OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
33 #
34 #
35 # For any questions regarding licensing please contact marketing@caviumnetworks.com
36 #
37 # ***********************license end**************************************/
38
39 #
40 #  component Makefile fragment
41 #
42
43 #  standard component Makefile header
44 sp              :=  $(sp).x
45 dirstack_$(sp)  :=  $(d)
46 d               :=  $(dir)
47
48 #  component specification
49
50 LIBRARY := $(OBJ_DIR)/libcvmx.a
51
52 OBJS_$(d)  :=  \
53         $(OBJ_DIR)/cvmx-bootmem.o \
54         $(OBJ_DIR)/cvmx-cn3010-evb-hs5.o \
55         $(OBJ_DIR)/cvmx-core.o \
56         $(OBJ_DIR)/cvmx-coremask.o \
57         $(OBJ_DIR)/cvmx-cmd-queue.o \
58         $(OBJ_DIR)/cvmx-csr-db.o \
59         $(OBJ_DIR)/cvmx-csr-db-support.o \
60         $(OBJ_DIR)/cvmx-dfa.o \
61         $(OBJ_DIR)/cvmx-dma-engine.o \
62         $(OBJ_DIR)/cvmx-ebt3000.o \
63         $(OBJ_DIR)/cvmx-flash.o \
64         $(OBJ_DIR)/cvmx-fpa.o \
65         $(OBJ_DIR)/cvmx-helper-board.o \
66         $(OBJ_DIR)/cvmx-helper-errata.o \
67         $(OBJ_DIR)/cvmx-helper-fpa.o \
68         $(OBJ_DIR)/cvmx-helper-loop.o \
69         $(OBJ_DIR)/cvmx-helper-npi.o \
70         $(OBJ_DIR)/cvmx-helper-rgmii.o \
71         $(OBJ_DIR)/cvmx-helper-sgmii.o \
72         $(OBJ_DIR)/cvmx-helper-spi.o \
73         $(OBJ_DIR)/cvmx-helper-util.o \
74         $(OBJ_DIR)/cvmx-helper-xaui.o \
75         $(OBJ_DIR)/cvmx-helper.o \
76         $(OBJ_DIR)/cvmx-interrupt-rsl.o \
77         $(OBJ_DIR)/cvmx-interrupt-decodes.o \
78         $(OBJ_DIR)/cvmx-l2c.o \
79         $(OBJ_DIR)/cvmx-llm.o \
80         $(OBJ_DIR)/cvmx-log-arc.o \
81         $(OBJ_DIR)/cvmx-log.o \
82         $(OBJ_DIR)/cvmx-mgmt-port.o \
83         $(OBJ_DIR)/cvmx-nand.o \
84         $(OBJ_DIR)/cvmx-pcie.o \
85         $(OBJ_DIR)/cvmx-pko.o \
86         $(OBJ_DIR)/cvmx-pow.o \
87         $(OBJ_DIR)/cvmx-raid.o \
88         $(OBJ_DIR)/cvmx-spi.o \
89         $(OBJ_DIR)/cvmx-spi4000.o \
90         $(OBJ_DIR)/cvmx-sysinfo.o \
91         $(OBJ_DIR)/cvmx-thunder.o \
92         $(OBJ_DIR)/cvmx-tim.o \
93         $(OBJ_DIR)/cvmx-tra.o \
94         $(OBJ_DIR)/cvmx-twsi.o \
95         $(OBJ_DIR)/cvmx-usb.o \
96         $(OBJ_DIR)/cvmx-warn.o \
97         $(OBJ_DIR)/cvmx-zip.o \
98         $(OBJ_DIR)/cvmx-zone.o \
99         $(OBJ_DIR)/octeon-model.o \
100         $(OBJ_DIR)/octeon-pci-console.o
101 ifeq (linux,$(findstring linux,$(OCTEON_TARGET)))
102 OBJS_$(d)  +=  \
103         $(OBJ_DIR)/cvmx-app-init-linux.o
104 else
105 OBJS_$(d)  +=  \
106         $(OBJ_DIR)/cvmx-interrupt.o \
107         $(OBJ_DIR)/cvmx-interrupt-handler.o \
108         $(OBJ_DIR)/cvmx-app-init.o \
109         $(OBJ_DIR)/cvmx-malloc.o
110 endif
111
112 $(OBJS_$(d)):  CFLAGS_LOCAL := -I$(d) -O2 -g -W -Wall -Wno-unused-parameter -Wundef
113
114 #  standard component Makefile rules
115
116 DEPS_$(d)   :=  $(OBJS_$(d):.o=.d)
117
118 LIBS_LIST   :=  $(LIBS_LIST) $(LIBRARY)
119
120 CLEAN_LIST  :=  $(CLEAN_LIST) $(OBJS_$(d)) $(DEPS_$(d)) $(LIBRARY)
121
122 -include $(DEPS_$(d))
123
124 $(LIBRARY): $(OBJS_$(d))
125         $(AR) -cr $@ $^
126
127 $(OBJ_DIR)/%.o: $(d)/%.c
128         $(COMPILE)
129
130 $(OBJ_DIR)/%.o: $(d)/%.S
131         $(ASSEMBLE)
132
133 $(OBJ_DIR)/cvmx-app-init-linux.o: $(d)/cvmx-app-init-linux.c
134         $(CC) $(CFLAGS_GLOBAL) $(CFLAGS_LOCAL) -MD -c -Umain -o $@ $<
135
136 CFLAGS_SPECIAL := -I$(d) -I$(d)/cvmx-malloc -O2 -g -DUSE_CVM_THREADS=1 -D_REENTRANT
137
138 $(OBJ_DIR)/cvmx-malloc.o: $(d)/cvmx-malloc/malloc.c
139         $(CC) $(CFLAGS_GLOBAL) $(CFLAGS_SPECIAL) -MD -c -o $@ $<
140
141 #  standard component Makefile footer
142
143 d   :=  $(dirstack_$(sp))
144 sp  :=  $(basename $(sp))