1 #/***********************license start***************
2 # Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are
10 # * Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
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.
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
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.
35 # For any questions regarding licensing please contact marketing@caviumnetworks.com
37 # ***********************license end**************************************/
40 # component Makefile fragment
43 # standard component Makefile header
45 dirstack_$(sp) := $(d)
48 # component specification
50 LIBRARY := $(OBJ_DIR)/libcvmx.a
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)))
103 $(OBJ_DIR)/cvmx-app-init-linux.o
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
112 $(OBJS_$(d)): CFLAGS_LOCAL := -I$(d) -O2 -g -W -Wall -Wno-unused-parameter -Wundef
114 # standard component Makefile rules
116 DEPS_$(d) := $(OBJS_$(d):.o=.d)
118 LIBS_LIST := $(LIBS_LIST) $(LIBRARY)
120 CLEAN_LIST := $(CLEAN_LIST) $(OBJS_$(d)) $(DEPS_$(d)) $(LIBRARY)
122 -include $(DEPS_$(d))
124 $(LIBRARY): $(OBJS_$(d))
127 $(OBJ_DIR)/%.o: $(d)/%.c
130 $(OBJ_DIR)/%.o: $(d)/%.S
133 $(OBJ_DIR)/cvmx-app-init-linux.o: $(d)/cvmx-app-init-linux.c
134 $(CC) $(CFLAGS_GLOBAL) $(CFLAGS_LOCAL) -MD -c -Umain -o $@ $<
136 CFLAGS_SPECIAL := -I$(d) -I$(d)/cvmx-malloc -O2 -g -DUSE_CVM_THREADS=1 -D_REENTRANT
138 $(OBJ_DIR)/cvmx-malloc.o: $(d)/cvmx-malloc/malloc.c
139 $(CC) $(CFLAGS_GLOBAL) $(CFLAGS_SPECIAL) -MD -c -o $@ $<
141 # standard component Makefile footer
143 d := $(dirstack_$(sp))
144 sp := $(basename $(sp))