Skip to content

Instantly share code, notes, and snippets.

@sbourdelin
Created September 29, 2014 15:14
Show Gist options
  • Save sbourdelin/9668e8d3071cdbc4f81c to your computer and use it in GitHub Desktop.
Save sbourdelin/9668e8d3071cdbc4f81c to your computer and use it in GitHub Desktop.
Buildroot: package local skeleton
# ====================================
# buildroot/package/skeleton/Config.in
# ====================================
config BR2_PACKAGE_SKELETON
bool "skeleton"
help
A skeleton package
# ==================================
# buildroot/package/Config.in
# ==================================
menu "skeleton"
source "package/skeleton/Config.in"
endmenu
# =======================================
# buildroot/package/skeleton/src/Makefile
# =======================================
all:
$(CC) *.c -o skeleton
/* ======================================
* buildroot/package/skeleton/src/skeleton.c
* ====================================== */
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Hello Skeleton\n");
return 0;
}
# ======================================
# buildroot/package/skeleton/skeleton.mk
# ======================================
SKELETON_VERSION = 1.0
SKELETON_SITE = $(TOPDIR)/package/skeleton/src/
SKELETON_SITE_METHOD = local
define SKELETON_BUILD_CMDS
$(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) all
endef
define SKELETON_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/skeleton $(TARGET_DIR)/bin
endef
$(eval $(generic-package))
@sbourdelin
Copy link
Author

base on Buildroot 2014.08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment