########################################## # Sample App package for PADS ########################################## #Check if we are using the WARP board ifeq ($(strip $(PADS_WARP)),y) #Define version of your package HELLO_WORLD_VER=1.0.1 #Define where your package will be compiled HELLO_WORLD_DIR=$(BUILD_DIR)/hello_world-$(HELLO_WORLD_VER) #Define the name of package to be downloaded HELLO_WORLD_SOURCE=hello_world-$(HELLO_WORLD_VER).tgz #Define the distribution site HELLO_WORLD_SITE=ftp://ftp.pikatech.com/outgoing/pads #Define a method to uncompress downloaded package HELLO_WORLD_UNZIP=zcat endif #Rule to define how to obtain your package (wget in this case) $(DL_DIR)/$(HELLO_WORLD_SOURCE): $(WGET) -P $(DL_DIR) $(HELLO_WORLD_SITE)/$(HELLO_WORLD_SOURCE) my_first_app-source: $(DL_DIR)/$(HELLO_WORLD_SOURCE) #Uncompress your package, then mark the directory with ".unpacked" file $(HELLO_WORLD_DIR)/.unpacked: $(DL_DIR)/$(HELLO_WORLD_SOURCE) $(HELLO_WORLD_UNZIP) $(DL_DIR)/$(HELLO_WORLD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - touch $(HELLO_WORLD_DIR)/.unpacked # If you need to configure your package, you would do it in this section. # Also, any necessary patches should be applied in this section # Once done, mark the folder with ".configured" $(HELLO_WORLD_DIR)/.configured: $(HELLO_WORLD_DIR)/.unpacked $(PATCH_KERNEL) $(HELLO_WORLD_DIR) package/hello_world hello_world.patch touch $(HELLO_WORLD_DIR)/.configured #Compile and install if applicable hello_world: $(HELLO_WORLD_DIR)/.configured $(MAKE) -C $(HELLO_WORLD_DIR) $(MAKE) INSTALL_LOCATION="$(TARGET_DIR)/usr" -C $(HELLO_WORLD_DIR) install cp -vfR package/hello_world/autorun/* $(PERSISTENT_STORAGE)/autorun/ echo "Hello World version" $(HELLO_WORLD_VER) >> $(PERSISTENT_STORAGE)/version_info.txt hello_world-configure: $(HELLO_WORLD_DIR)/.configured #If you want to start over.. hello_world-clean: if test -d $(HELLO_WORLD_DIR); then \ $(MAKE) -C $(HELLO_WORLD_DIR) clean; \ $(MAKE) INSTALL_LOCATION="$(TARGET_DIR)/usr" -C $(HELLO_WORLD_DIR) uninstall; \ fi hello_world-config: $(HELLO_WORLD_DIR)/.configured #This section will bring it up to defaults hello_world-dirclean: hello_world-clean $(RM) -r $(HELLO_WORLD_DIR) ################################################ # # Toplevel Makefile options # ################################################# # Over here we check for "y" on our package and add it to the list of targets. # If your app requires other packages, please specify them here ifeq ($(strip $(PADS_PACKAGE_HELLO_WORLD)),y) TARGETS+=hello_world endif