]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/sandbox/cpu/Makefile
sandbox: Add SDL library for LCD, keyboard, audio
[karo-tx-uboot.git] / arch / sandbox / cpu / Makefile
index 8dfa8283541a2232e829a9e68b51f67ca96dccbe..7d4410c42a20a6760babfdf28308a3069cd36fec 100644 (file)
@@ -4,44 +4,19 @@
 # (C) Copyright 2000-2003
 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 #
-# See file CREDITS for list of people who contributed to this
-# project.
+# SPDX-License-Identifier:     GPL-2.0+
 #
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-
-include $(TOPDIR)/config.mk
-
-LIB    = $(obj)lib$(CPU).o
-
-COBJS  := cpu.o
-
-SRCS   := $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS))
-
-all:   $(obj).depend $(LIB)
-
-$(LIB):        $(OBJS)
-       $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
 
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
+obj-y  := cpu.o os.o start.o state.o
+obj-$(CONFIG_SANDBOX_SDL)      += sdl.o
 
-sinclude $(obj).depend
+# os.c is build in the system environment, so needs standard includes
+# CFLAGS_REMOVE_os.o cannot be used to drop header include path
+quiet_cmd_cc_os.o = CC $(quiet_modtag)  $@
+cmd_cc_os.o = $(CC) $(filter-out -nostdinc, \
+       $(patsubst -I%,-idirafter%,$(c_flags))) -c -o $@ $<
 
-#########################################################################
+$(obj)/os.o: $(src)/os.c FORCE
+       $(call if_changed_dep,cc_os.o)
+$(obj)/sdl.o: $(src)/sdl.c FORCE
+       $(call if_changed_dep,cc_os.o)