Makefile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # $Id$
  2. #-
  3. # This file is part of the OpenADK project. OpenADK is copyrighted
  4. # material, please see the LICENCE file in the top-level directory.
  5. include ${TOPDIR}/rules.mk
  6. PKG_NAME:= cfgfs
  7. PKG_VERSION:= 1.0.6
  8. PKG_RELEASE:= 2
  9. WRKDIST= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION}
  10. NO_DISTFILES:= 1
  11. include ${TOPDIR}/mk/package.mk
  12. $(eval $(call PKG_template,CFGFS,cfgfs,${PKG_VERSION}-${PKG_RELEASE}))
  13. BUILD_STYLE:= auto
  14. do-configure:
  15. mkdir -p ${WRKBUILD}
  16. ${CP} ./src/* ${WRKBUILD}
  17. ${TARGET_CC} ${TCPPFLAGS} ${TCFLAGS} -o ${WRKBUILD}/mtd ${WRKBUILD}/mtd.c
  18. do-install:
  19. ${INSTALL_DIR} ${IDIR_CFGFS}/sbin
  20. ${INSTALL_BIN} ${WRKBUILD}/fwcf.sh ${IDIR_CFGFS}/sbin/cfgfs
  21. ${INSTALL_BIN} ${WRKBUILD}/fwcf.helper.out ${IDIR_CFGFS}/sbin/cfgfs.helper
  22. ifeq ($(ARCH),cris)
  23. ${INSTALL_BIN} ${WRKBUILD}/mtd ${IDIR_CFGFS}/sbin/mtd
  24. echo '#!/bin/sh' > ${IDIR_CFGFS}/sbin/cfgfs.write
  25. echo 'mtd -F write - cfgfs' >> ${IDIR_CFGFS}/sbin/cfgfs.write
  26. else
  27. echo '#!/bin/sh' > ${IDIR_CFGFS}/sbin/cfgfs.write
  28. echo 'cat > /dev/sda2' >> ${IDIR_CFGFS}/sbin/cfgfs.write
  29. endif
  30. chmod 755 ${IDIR_CFGFS}/sbin/cfgfs.write
  31. include ${TOPDIR}/mk/pkg-bottom.mk