########################################## # Sample App package for PADS ########################################## #Check if we are using WARP board ifeq ($(strip $(PADS_WARP)),y) #Define version of your package MONZAIVR_VER=2.6.0-1 #Define where your packaging will be compiled MONZAIVR_DIR=$(BUILD_DIR)/monzaivr-$(MONZAIVR_VER) #Define the name of package to be downloaded MONZAIVR_SOURCE=monzaivr-$(MONZAIVR_VER).tgz #Define the distribution site MONZAIVR_SITE=ftp://ftp.pikatech.com/outgoing/pads/samples #Define a method to uncompress downloaded package MONZAIVR_UNZIP=zcat MONZAIVR_PREFIX = /usr MONZAIVR_CFLAGS = -g -fPIC endif #Rule to define how to obtain your package (wget in this case) $(DL_DIR)/$(MONZAIVR_SOURCE): $(WGET) -P $(DL_DIR) $(MONZAIVR_SITE)/$(MONZAIVR_SOURCE) monzaivr-source: $(DL_DIR)/$(MONZAIVR_SOURCE) #Uncompress your package, then mark the directory with ".unpacked" file $(MONZAIVR_DIR)/.unpacked: $(DL_DIR)/$(MONZAIVR_SOURCE) $(MONZAIVR_UNZIP) $(DL_DIR)/$(MONZAIVR_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - touch $(MONZAIVR_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" $(MONZAIVR_DIR)/.configured: $(MONZAIVR_DIR)/.unpacked $(PATCH_KERNEL) $(MONZAIVR_DIR) package/monzaivr monzaivr.patch touch $(MONZAIVR_DIR)/.configured #Compile and install if applicable monzaivr: $(MONZAIVR_DIR)/.configured $(MAKE) CC=$(TARGET_CC) CXX=$(TARGET_CXX) AR=$(TARGET_AR) PIKA_CFLAGS="$(MONZAIVR_CFLAGS) -DPK_WARP" \ PIKA_INC="$(TARGET_DIR)$(MONZAIVR_PREFIX)/include/pika" PIKA_LIB="$(TARGET_DIR)$(MONZAIVR_PREFIX)/lib" \ -C $(MONZAIVR_DIR) $(MFLAGS) $(MAKE) INSTALL_LOCATION="$(TARGET_DIR)/usr/bin" -C $(MONZAIVR_DIR) install echo "MonzaIVR version" $(MONZAIVR_VER) >> $(PERSISTENT_STORAGE)/version_info.txt monzaivr-configure: $(MONZAIVR_DIR)/.configured #If you want to start over.. monzaivr-clean: if test -d $(MONZAIVR_DIR); then \ $(MAKE) -C $(MONZAIVR_DIR) clean; \ fi $(RM) $(TARGET_DIR)/usr/bin/monzaivr monzaivr-config: $(MONZAIVR_DIR)/.configured #This section will bring it up to defaults monzaivr-dirclean: monzaivr-clean $(RM) -r $(MONZAIVR_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_MONZAIVR)),y) TARGETS+=hmp monzaivr endif