############################################################################## # # - Unified Makefile for XviD for *nix environments - # # Copyright(C) 2003 Edouard Gomez # # # Description: # This Makefile allows building XviD sources to obtain a shared library # 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. # # 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. # ############################################################################## include sources.inc include platform.inc RM = rm -rf ############################################################################## # # Build rules # ############################################################################## # Their 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 #----------------------------------------------------------------------------- .SUFFIXES: .$(OBJECT_EXTENSION) .$(ASSEMBLY_EXTENSION) .c all: $(STATIC_LIB) $(SHARED_LIB) @echo @echo "---------------------------------------------------------------" @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 " A: $(@D)/$(