From 896b5803cf1de70175c44bb4bdb11d5749bb5007 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 18 Nov 2005 18:05:53 +0000 Subject: clean targets sorted and tested. There are now standard clean targets based on the destinations which are part of Makefile.buildlayout svn path=/trunk/; revision=3964 --- packages/Makefile | 112 +++++++++++++++++++++--------------- packages/Makefile.buildlayout | 128 ++++++++++++++++++++++++++++++++++++++++-- packages/TODO | 15 +++++ 3 files changed, 206 insertions(+), 49 deletions(-) (limited to 'packages') diff --git a/packages/Makefile b/packages/Makefile index 11966156..21d7cb96 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -14,7 +14,7 @@ BUILDLAYOUT_DIR = $(CWD) # default target -all: abstractions doc externals gem pd +all: abstractions doc externals flext gem pd @echo "Complete build succeeded!" include $(BUILDLAYOUT_DIR)/Makefile.buildlayout @@ -23,30 +23,8 @@ include $(BUILDLAYOUT_DIR)/Makefile.buildlayout # output to the same directory tree DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \ SRC_ROOT_DIR=$(SRC_ROOT_DIR) \ - INSTALL_PREFIX=$(INSTALL_PREFIX) -# APPLICATIONS_DEST=$(APPLICATIONS_DEST) \ -# DOCS_DEST=$(DOCS_DEST) \ -# HELP_DEST=$(HELP_DEST) \ -# MANUALS_DEST=$(MANUALS_DEST) \ -# OBJECTS_DEST=$(OBJECTS_DEST) - -#------------------------------------------------------------------------------ -# which OS to compile for -UNAME := $(shell uname -s) -ifeq ($(UNAME),Linux) - OS_NAME = linux -else - ifeq ($(UNAME),Darwin) - OS_NAME = darwin - else - ifeq (MINGW,$(findstring MINGW,$(UNAME))) - OS_NAME = win - else - OS_NAME = unknown - $(warning WARNING: unknown environment "$(UNAME)".) - endif - endif -endif + INSTALL_PREFIX=$(INSTALL_PREFIX) \ + UNAME=$(UNAME) #==============================================================================# # @@ -57,7 +35,7 @@ endif #------------------------------------------------------------------------------ # abstractions abstractions: - make -f $(ABSTRACTIONS_SRC)/Makefile $(DEST_PATHS) install + #------------------------------------------------------------------------------ # doc @@ -66,21 +44,14 @@ doc: #------------------------------------------------------------------------------ # externals -externals: externals_$(OS_NAME) -# doc - make -f $(EXTERNALS_SRC)/build/doc/makefile $(DEST_PATHS) install - @echo "Making externals for $(OS_NAME) aka $(UNAME)" - make -f $(EXTERNALS_SRC)/build/$(OS_NAME)/makefile $(DEST_PATHS) install - -# these targets are for platform-specific needs -externals_darwin: +externals: + cd $(EXTERNALS_SRC) && make $(DEST_PATHS) -externals_linux: -externals_win: +#------------------------------------------------------------------------------ +# flext +flext: -externals_unknown: -# this target is for "everything else" #------------------------------------------------------------------------------ # Gem @@ -91,20 +62,73 @@ gem: # pd pd: +#==============================================================================# +# +# INSTALL TARGETS +# +#==============================================================================# + +#------------------------------------------------------------------------------ +# abstractions +abstractions_install: + cd $(ABSTRACTIONS_SRC) && make $(DEST_PATHS) install + +#------------------------------------------------------------------------------ +# doc +doc_install: + + +#------------------------------------------------------------------------------ +# externals +externals_install: + cd $(EXTERNALS_SRC) && make $(DEST_PATHS) install + + +#------------------------------------------------------------------------------ +# flext_install +flext_install: + + +#------------------------------------------------------------------------------ +# Gem +gem_install: + + +#------------------------------------------------------------------------------ +# pd +pd_install: + + +#------------------------------------------------------------------------------ +# install +install: abstractions_install doc_install externals_install flext_install +install: gem_install pd_install + @echo "Complete install succeeded!" #==============================================================================# # CLEAN TARGETS #==============================================================================# abstractions_clean: - make -f $(ABSTRACTIONS_SRC)/Makefile $(DEST_PATHS) clean + -cd $(ABSTRACTIONS_SRC) && make $(DEST_PATHS) clean + + +doc_clean: externals_clean: - make -f $(EXTERNALS_SRC)/build/$(OS_NAME)/makefile $(DEST_PATHS) clean + -cd $(EXTERNALS_SRC) && make $(DEST_PATHS) clean + + +flext_clean: + + +gem_clean: +pd_clean: -clean: abstractions_clean - -rm -f *~ - rm -rf $(MANUALS_DEST) $(HELP_DEST) - rmdir $(DOCS_DEST) $(INSTALL_PREFIX) +# these targets are all from Makefile.buildlayout: +# install_clean cruft_clean +clean: abstractions_clean doc_clean externals_clean flext_clean +clean: gem_clean pd_clean + echo "Complete clean finished." diff --git a/packages/Makefile.buildlayout b/packages/Makefile.buildlayout index a2e6ef06..9648deee 100644 --- a/packages/Makefile.buildlayout +++ b/packages/Makefile.buildlayout @@ -1,6 +1,11 @@ - -## Makefile.buildlayout - +#==============================================================================# +# +# Centralized cross-platform build system Makefile.buildsystem +# +# this file contains all the common locations and targets +# +# +#==============================================================================# # This file should be exactly the same in each section of the CVS. A copy is # kept in each section of the CVS so that each section will be self-contained. # To use it, you need to include it in your Makefile (i.e. "include @@ -25,6 +30,39 @@ # # +#==============================================================================# +# +## PLATFORM-SPECIFIC SETTINGS +# +#==============================================================================# +# which OS to compile for +UNAME := $(shell uname -s) +ifeq ($(UNAME),Linux) + OS_NAME = linux + EXTENSION = pd_linux +else + ifeq ($(UNAME),Darwin) + OS_NAME = darwin + EXTENSION = pd_darwin + else + ifeq (MINGW,$(findstring MINGW,$(UNAME))) + OS_NAME = win + EXTENSION = dll + else + OS_NAME = unknown + EXTENSION = so + $(warning WARNING: unknown environment "$(UNAME)".) + endif + endif +endif + + +#==============================================================================# +# +# DIRECTORY STRUCTURE +# +#==============================================================================# + # sources ABSTRACTIONS_SRC = $(SRC_ROOT_DIR)/abstractions DOC_SRC = $(SRC_ROOT_DIR)/doc @@ -43,9 +81,13 @@ OBJECTS_DEST = $(INSTALL_PREFIX)/extra HELP_DEST = $(DOCS_DEST)/5.reference MANUALS_DEST = $(DOCS_DEST)/manuals -#------------------------------------------------------------------------------# + +#==============================================================================# +# # DIRECTORY STRUCTURE TARGETS -#------------------------------------------------------------------------------# +# +#==============================================================================# + # first make sure that the directory structure is setup $(INSTALL_PREFIX): install -d $(INSTALL_PREFIX) @@ -65,3 +107,79 @@ $(MANUALS_DEST): $(INSTALL_PREFIX) $(OBJECTS_DEST): $(INSTALL_PREFIX) install -d $(OBJECTS_DEST) + +#==============================================================================# +# +# CLEAN TARGETS +# +#==============================================================================# + +applications_clean: + -rm -f -- $(APPLICATIONS_DEST)/*/*/*/*/*.* + -rm -f -- $(APPLICATIONS_DEST)/*/*/*/*.* + -rm -f -- $(APPLICATIONS_DEST)/*/*/*.* + -rm -f -- $(APPLICATIONS_DEST)/*/*.* + -rmdir $(APPLICATIONS_DEST)/*/*/*/* + -rmdir $(APPLICATIONS_DEST)/*/*/* + -rmdir $(APPLICATIONS_DEST)/*/* + -rmdir $(APPLICATIONS_DEST)/* + -rmdir $(APPLICATIONS_DEST) + + +help_clean: + -rm -f -- $(HELP_DEST)/*/*/*.* + -rm -f -- $(HELP_DEST)/*/*.* + -rm -f -- $(HELP_DEST)/*.* + -rmdir $(HELP_DEST)/*/* + -rmdir $(HELP_DEST)/* + -rmdir $(HELP_DEST) + + +manuals_clean: + -rm -f -- $(MANUALS_DEST)/*/*/*.* + -rm -f -- $(MANUALS_DEST)/*/*.* + -rmdir $(MANUALS_DEST)/*/* + -rmdir $(MANUALS_DEST)/* + -rmdir $(MANUALS_DEST) + + +objects_clean: + -rm $(OBJECTS_DEST)/*/*/*.pd + -rm $(OBJECTS_DEST)/*/*.pd + -rm $(OBJECTS_DEST)/*.pd + -rm $(OBJECTS_DEST)/*/*/*.$(EXTENSION) + -rm $(OBJECTS_DEST)/*/*.$(EXTENSION) + -rm $(OBJECTS_DEST)/*.$(EXTENSION) + -rmdir $(OBJECTS_DEST)/*/* + -rmdir $(OBJECTS_DEST)/* + -rmdir $(OBJECTS_DEST) + + +install_clean: applications_clean help_clean manuals_clean objects_clean + -rmdir $(DOCS_DEST) + -rmdir $(INSTALL_PREFIX) + @echo " " + @echo "Build destination cleaned: $(INSTALL_PREFIX)" + + +cruft_clean: +# emacs litter + -rm -f -- */*/*/*/*.*~ + -rm -f -- */*/*/*.*~ + -rm -f -- */*/*.*~ + -rm -f -- */*.*~ + -rm -f -- *.*~ +# sed replace litter + -rm -f -- */*/*/*/*.*.bak + -rm -f -- */*/*/*.*.bak + -rm -f -- */*/*.*.bak + -rm -f -- */*.*.bak + -rm -f -- *.*.bak +# autoconf cache + -rm -rf -- */*/*/*/autom4te.cache + -rm -rf -- */*/*/autom4te.cache + -rm -rf -- */*/autom4te.cache + -rm -rf -- */autom4te.cache + -rm -rf -- autom4te.cache + + diff --git a/packages/TODO b/packages/TODO index 10b85331..45d83e5d 100644 --- a/packages/TODO +++ b/packages/TODO @@ -1,4 +1,19 @@ +- make abstraction -lib loader. when a -lib mylibrary name is tried and fails + in the path, then fails with IO's altname, then try to load as a path on top + of extra: i.e. extra/mylibrary. If found, add to path, and add + doc/5.reference/mylibrary to helppath. + + - call it sys_load_lib_folder();, + + - insert it after if (!sys_load_lib()) in s_main.c + +- make pd section since I can't easily modify the pd tree + +- add notes.txt to manuals + +- create patch system and incorporate IO's hex patch + - hex convertor for setup function names, and object file names - merge in tigital's Makefile++ -- cgit v1.2.1