gluon/Makefile

37 lines
995 B
Makefile
Raw Normal View History

2013-02-11 22:06:19 +00:00
GLUONDIR:=${CURDIR}
2013-02-11 03:52:16 +00:00
LN_S:=ln -sf
2013-02-11 22:06:19 +00:00
all: images
include $(GLUONDIR)/builder/gluon.mk
2013-02-11 03:52:16 +00:00
BOARD:=ar71xx
2013-02-11 22:06:19 +00:00
PROFILES:=TLWR741
null :=
space := ${null} ${null}
${space} := ${space}
prepare:
mkdir -p $(GLUON_IMAGEDIR) $(GLUON_BUILDDIR)
echo 'src packages file:../openwrt/bin/$(BOARD)/packages' > $(GLUON_BUILDDIR)/opkg-$(BOARD).conf
2013-02-11 23:09:22 +00:00
$(LN_S) $(GLUON_BUILDERDIR)/feeds.conf $(GLUON_OPENWRTDIR)/feeds.conf
$(GLUON_OPENWRTDIR)/scripts/feeds uninstall -a
$(GLUON_OPENWRTDIR)/scripts/feeds update -a
$(GLUON_OPENWRTDIR)/scripts/feeds install -a
2013-02-11 22:06:19 +00:00
echo 'CONFIG_TARGET_$(BOARD)=y' > $(GLUON_OPENWRTDIR)/.config
echo -e "$(subst ${ },\n,$(patsubst %,CONFIG_PACKAGE_%=m,$(GLUON_PACKAGES)))" >> $(GLUON_OPENWRTDIR)/.config
2013-02-11 23:09:22 +00:00
$(MAKE) -C $(GLUON_OPENWRTDIR) defconfig prepare package/compile
2013-02-11 22:06:19 +00:00
image-%: prepare
$(MAKE) -C $(GLUON_BUILDERDIR) image \
PACKAGE_DIR=$(GLUON_OPENWRTDIR)/bin/$(BOARD)/packages \
PROFILE=$(subst image-,,$@)
2013-02-11 03:52:16 +00:00
2013-02-11 22:06:19 +00:00
images: $(patsubst %,image-%,$(PROFILES))
2013-02-11 03:52:16 +00:00
2013-02-11 22:06:19 +00:00
.PHONY: all images prepare