--- branches/dev-api-4/xvidcore/build/generic/Makefile 2003/09/24 01:38:29 1153 +++ branches/dev-api-4/xvidcore/build/generic/Makefile 2003/09/28 13:21:59 1154 @@ -7,15 +7,35 @@ # # Description: # This Makefile allows building XviD sources to obtain a shared library -# and a static library. This Makefie uses variables defined in the +# and a static library. This Makefile uses variables defined in the # platform.inc file. This platform.inc file is usually created by the # ./configure script whenever a unix shell is available. # -# Nota Bene for mingw32/djgpp users: -# However if you provide a platform.inc file adapted to your OS, then -# change the include platform.inc to include yourfile.inc and it should -# work too. -# +# Makefile functionnal dependencies: +# - echo +# - rm (with option -r and -f) +# - cd +# - make VPATH support (eg: GNU make, solaris 8 make) +# +# Building output: +# - C means "_C_ompiling" +# - A means "_A_ssembling" +# - I means "_I_nstalling" +# - D means "creating _D_irectory" +# - Cl means "_Cl_eaning" +# +# NB: (for mingw32/djgpp users) +# These 2 environments do not provide a shell by default. So it's impossible +# to use the configure script to generate a platform.inc file suitable for +# your machine. You have two choices: +# - install minsys from the mingw project or install cygwin and then use +# the configure script as on a unix system. +# - write a platform.inc file by hand. +# +# PS: default build directory is "=build", it fits naming conventions that +# make the arch/tla revision control program ignore files contained in +# this directory during commits operations. This choice is completly +# arbitrary, but try not to change it. # ############################################################################## @@ -31,9 +51,14 @@ ############################################################################## # Their Objects -OBJECTS=$(GENERIC_OBJECTS) -OBJECTS+=$(ASSEMBLY_OBJECTS) -OBJECTS+=$(DCT_IA64_OBJECTS) +OBJECTS = $(GENERIC_OBJECTS) +OBJECTS += $(ASSEMBLY_OBJECTS) +OBJECTS += $(DCT_IA64_OBJECTS) + +# The VPATH mecanism could use a "per target" build directory +# To keep it simple at the moment, the directory is fixed to "build" +BUILD_DIR = =build +VPATH = $(SRC_DIR):$(BUILD_DIR) #----------------------------------------------------------------------------- # The default rule @@ -41,117 +66,126 @@ .SUFFIXES: .$(OBJECT_EXTENSION) .$(ASSEMBLY_EXTENSION) .c -all: platform.inc $(STATIC_LIB) $(SHARED_LIB) +all: $(STATIC_LIB) $(SHARED_LIB) @echo @echo "---------------------------------------------------------------" - @echo " XviD has been built, you can now run \"# make install\" as root." + @echo " XviD has been successfully built." + @echo + @echo " * Binaries are currently located in the '$(BUILD_DIR)' directory" + @echo " * To install them on your system, you can run '# make install'" + @echo " as root." @echo "---------------------------------------------------------------" @echo +$(OBJECTS): platform.inc + +$(BUILD_DIR): + @echo " D: $(BUILD_DIR)" + @$(INSTALL) -d $(BUILD_DIR) + #----------------------------------------------------------------------------- # Generic assembly rule #----------------------------------------------------------------------------- .$(ASSEMBLY_EXTENSION).$(OBJECT_EXTENSION): - @echo -n "Assembling $< ... " - @$(AS) $(AFLAGS) $< -o $@ - @echo "Done" + @echo " A: $(@D)/$(