Łukasz Dałek | 34cda7a | 2012-10-15 07:46:54 +0000 | [diff] [blame] | 1 | # |
| 2 | # h2200 Support |
| 3 | # |
| 4 | # Copyright (C) 2012 Lukasz Dalek <luk0104@gmail.com> |
| 5 | # |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 6 | # SPDX-License-Identifier: GPL-2.0+ |
Łukasz Dałek | 34cda7a | 2012-10-15 07:46:54 +0000 | [diff] [blame] | 7 | # |
| 8 | |
| 9 | include $(TOPDIR)/config.mk |
| 10 | |
| 11 | LIB = $(obj)lib$(BOARD).o |
| 12 | |
| 13 | COBJS := h2200.o |
| 14 | |
| 15 | SRCS := $(COBJS:.o=.c) h2200-header.S |
| 16 | OBJS := $(addprefix $(obj),$(COBJS)) |
| 17 | |
| 18 | all: $(LIB) $(obj)h2200-header.bin |
| 19 | |
| 20 | $(obj)h2200-header.o: h2200-header.S |
| 21 | $(CC) $(CFLAGS) -c -o $@ $< |
| 22 | |
| 23 | $(obj)h2200-header.bin: $(obj)h2200-header.o |
| 24 | $(OBJCOPY) -O binary $< $@ |
| 25 | |
| 26 | $(LIB): $(obj).depend $(OBJS) |
| 27 | $(call cmd_link_o_target, $(OBJS)) |
| 28 | |
| 29 | ######################################################################### |
| 30 | |
| 31 | # defines $(obj).depend target |
| 32 | include $(SRCTREE)/rules.mk |
| 33 | |
| 34 | sinclude $(obj).depend |
| 35 | |
| 36 | ######################################################################### |