aboutsummaryrefslogtreecommitdiffstats
path: root/libfdt/libfdt.mk
diff options
context:
space:
mode:
Diffstat (limited to 'libfdt/libfdt.mk')
-rw-r--r--libfdt/libfdt.mk88
1 files changed, 88 insertions, 0 deletions
diff --git a/libfdt/libfdt.mk b/libfdt/libfdt.mk
new file mode 100644
index 000000000000..742c94a94274
--- /dev/null
+++ b/libfdt/libfdt.mk
@@ -0,0 +1,88 @@
+#/***********************license start***************
+# Copyright (c) 2003-2007 Cavium Inc. (support@cavium.com). All rights
+# reserved.
+#
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+#
+# * Neither the name of Cavium Inc. nor the names of
+# its contributors may be used to endorse or promote products
+# derived from this software without specific prior written
+# permission.
+#
+# TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+# AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
+# OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+# RESPECT TO THE SOFTWARE, aplINCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
+# REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
+# DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
+# OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
+# PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
+# POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT
+# OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
+#
+#
+# For any questions regarding licensing please contact marketing@cavium.com
+#
+# ***********************license end**************************************/
+
+#
+# component Makefile fragment
+#
+
+# standard component Makefile header
+sp := $(sp).x
+dirstack_$(sp) := $(d)
+d := $(dir)
+
+# component specification
+
+LIBRARY := $(OBJ_DIR)/libfdt.a
+
+OBJS_$(d) := \
+ $(OBJ_DIR)/fdt.o \
+ $(OBJ_DIR)/fdt_ro.o \
+ $(OBJ_DIR)/fdt_rw.o \
+ $(OBJ_DIR)/fdt_strerror.o \
+ $(OBJ_DIR)/fdt_sw.o \
+ $(OBJ_DIR)/fdt_wip.o
+
+
+$(OBJS_$(d)): CFLAGS_LOCAL := -I$(d) -I$(d)/libfdt -O2 -g -W -Wall -Wno-unused-parameter -Wundef -G0
+
+# standard component Makefile rules
+
+DEPS_$(d) := $(OBJS_$(d):.o=.d)
+
+LIBS_LIST := $(LIBS_LIST) $(LIBRARY)
+
+CLEAN_LIST := $(CLEAN_LIST) $(OBJS_$(d)) $(DEPS_$(d)) $(LIBRARY)
+
+-include $(DEPS_$(d))
+
+$(LIBRARY): $(OBJS_$(d))
+ $(AR) -cr $@ $^
+
+$(OBJ_DIR)/%.o: $(d)/%.c
+ $(COMPILE)
+
+$(OBJ_DIR)/%.o: $(d)/libftd/%.c
+ $(COMPILE)
+
+$(OBJ_DIR)/%.o: $(d)/%.S
+ $(ASSEMBLE)
+
+# standard component Makefile footer
+
+d := $(dirstack_$(sp))
+sp := $(basename $(sp))