#
include $(TOPDIR)/config.mk
+ ifneq ($(OBJTREE),$(SRCTREE))
+ $(shell mkdir -p $(obj)../common)
+ endif
- LIB = lib$(BOARD).a
+ LIB = $(obj)lib$(BOARD).a
- OBJS := $(BOARD).o \
+ COBJS := $(BOARD).o \
../common/cadmus.o \
- ../common/eeprom.o
+ ../common/eeprom.o \
+ ../common/ft_board.o \
+ ../common/via.o
SOBJS := init.o
#
include $(TOPDIR)/config.mk
+ ifneq ($(OBJTREE),$(SRCTREE))
+ $(shell mkdir -p $(obj)../common)
+ endif
- LIB = lib$(BOARD).a
+ LIB = $(obj)lib$(BOARD).a
- OBJS := $(BOARD).o \
+ COBJS := $(BOARD).o \
../common/cadmus.o \
- ../common/eeprom.o
+ ../common/eeprom.o \
+ ../common/ft_board.o \
+ ../common/via.o
SOBJS := init.o
#
include $(TOPDIR)/config.mk
+ ifneq ($(OBJTREE),$(SRCTREE))
+ $(shell mkdir -p $(obj)../common)
+ endif
- LIB = lib$(BOARD).a
+ LIB = $(obj)lib$(BOARD).a
- OBJS := $(BOARD).o \
+ COBJS := $(BOARD).o \
../common/cadmus.o \
- ../common/eeprom.o
+ ../common/eeprom.o \
+ ../common/ft_board.o \
+ ../common/via.o
SOBJS := init.o
include $(TOPDIR)/config.mk
- LIB = lib$(BOARD).a
+ LIB = $(obj)lib$(BOARD).a
- OBJS = $(BOARD).o
-COBJS = $(BOARD).o oftree.o
++COBJS = $(BOARD).o
- $(LIB): .depend $(OBJS)
- $(AR) crv $@ $(OBJS)
+ SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+ OBJS := $(addprefix $(obj),$(COBJS))
+ SOBJS := $(addprefix $(obj),$(SOBJS))
+
+ $(LIB): $(obj).depend $(OBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS)
-$(obj)%.dtb: $(src)%.dts
- dtc -f -V 0x10 -I dts -O dtb $< >$@
-
-$(obj)%.c: $(obj)%.dtb
- xxd -i $< \
- | sed -e "s/^unsigned char/const unsigned char/g" \
- | sed -e "s/^unsigned int/const unsigned int/g" > $@
-
#########################################################################
- .depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
- $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+ # defines $(obj).depend target
+ include $(SRCTREE)/rules.mk
- sinclude .depend
+ sinclude $(obj).depend
#########################################################################