Created
September 29, 2014 15:14
-
-
Save sbourdelin/9668e8d3071cdbc4f81c to your computer and use it in GitHub Desktop.
Buildroot: package local skeleton
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ==================================== | |
# buildroot/package/skeleton/Config.in | |
# ==================================== | |
config BR2_PACKAGE_SKELETON | |
bool "skeleton" | |
help | |
A skeleton package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ================================== | |
# buildroot/package/Config.in | |
# ================================== | |
menu "skeleton" | |
source "package/skeleton/Config.in" | |
endmenu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ======================================= | |
# buildroot/package/skeleton/src/Makefile | |
# ======================================= | |
all: | |
$(CC) *.c -o skeleton |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ====================================== | |
* buildroot/package/skeleton/src/skeleton.c | |
* ====================================== */ | |
#include <stdio.h> | |
int main(int argc, char *argv[]) | |
{ | |
printf("Hello Skeleton\n"); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ====================================== | |
# 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)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
base on Buildroot 2014.08