########################################## # libogg package for PADS ########################################## #Check if we are using WARP board ifeq ($(strip $(PADS_WARP)),y) #Define version of your package LIBOGG_VER=1.1.3 #Define where your packaging will be compiled LIBOGG_DIR=$(BUILD_DIR)/libogg-$(LIBOGG_VER) #Define the name of package to be downloaded LIBOGG_SOURCE=libogg-$(LIBOGG_VER).tar.gz #Define the distribution site LIBOGG_SITE=http://downloads.xiph.org/releases/ogg #Define a method to uncompress downloaded package LIBOGG_UNZIP=tar xfz endif LIBOGG_CONFIGURE_OPTS=--host=powerpc-linux --prefix=$(TARGET_DIR)/usr ifeq ($(ARCH),) ARCH := powerpc endif export CROSS_COMPILE=ppc_4xxFP- #Rule to define how to obtain your package (wget in this case) $(DL_DIR)/$(LIBOGG_SOURCE): $(WGET) -P $(DL_DIR) $(LIBOGG_SITE)/$(LIBOGG_SOURCE) #Uncompress the package, then mark the directory with ".unpacked" file $(LIBOGG_DIR)/.unpacked: $(DL_DIR)/$(LIBOGG_SOURCE) $(LIBOGG_UNZIP) $(DL_DIR)/$(LIBOGG_SOURCE) -C $(BUILD_DIR) touch $(LIBOGG_DIR)/.unpacked # Configure the package, once done, mark the folder with ".configured" $(LIBOGG_DIR)/.configured: $(LIBOGG_DIR)/.unpacked cd $(LIBOGG_DIR); ./configure $(LIBOGG_CONFIGURE_OPTS) touch $(LIBOGG_DIR)/.configured #Compile and install if applicable libogg: $(LIBOGG_DIR)/.configured $(MAKE) -C $(LIBOGG_DIR) $(MAKE) -C $(LIBOGG_DIR) install-exec mkdir -p $(TARGET_DIR)/usr/include/ogg cp $(LIBOGG_DIR)/include/ogg/*.h $(TARGET_DIR)/usr/include/ogg libogg-configure: $(LIBOGG_DIR)/.configured libogg-config: $(LIBOGG_DIR)/.configured #If you want to start over.. libogg-clean: $(MAKE) -C $(LIBOGG_DIR) clean $(RM) -f $(LIBOGG_DIR)/.configured libogg-distclean: $(MAKE) -C $(LIBOGG_DIR) uninstall $(MAKE) -C $(LIBOGG_DIR) distclean $(RM) -rf $(LIBOGG_DIR) #This section will bring it up to defaults libogg-dirclean: libogg-distclean $(RM) -rf $(LIBOGG_DIR) $(RM) -rf $(DL_DIR)/$(LIBOGG_SOURCE) ################################################ # # 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_LIBOGG)),y) TARGETS+=libogg endif