[svn] / branches / release-1_2-branch / xvidcore / vfw / bin / Makefile Repository:
ViewVC logotype

Annotation of /branches/release-1_2-branch/xvidcore/vfw/bin/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1859 - (view) (download)

1 : edgomez 1382 ##############################################################################
2 :     #
3 :     # Makefile for XviD VFW driver
4 :     #
5 : edgomez 1609 # Author : Milan Cutka <cutka at szm.sk>
6 : edgomez 1382 # Modified by : Edouard Gomez <ed.gomez at free.fr>
7 :     # Peter Ross <pross@xvid.org>
8 :     #
9 :     # Requires GNU Make because of shell expansion performed at a bad time with
10 :     # other make programs (even using := variable assignments)
11 :     #
12 : Isibaar 1859 # $Id: Makefile,v 1.6.2.1 2009-05-25 08:31:16 Isibaar Exp $
13 : edgomez 1382 ##############################################################################
14 :    
15 :     include sources.inc
16 :    
17 :     MAKEFILE_PWD:=$(shell pwd)
18 :     LOCAL_XVID_SRCTREE:=$(MAKEFILE_PWD)/../../src
19 :     LOCAL_XVID_BUILDTREE:=$(MAKEFILE_PWD)/../../build/generic/=build
20 :    
21 :     RM = rm -rf
22 :     WINDRES=windres
23 :    
24 :     # Constants which should not be modified
25 :     # The `mingw-runtime` package is required when building with -mno-cygwin
26 :     CFLAGS += -I$(SRC_DIR)/w32api -I$(LOCAL_XVID_SRCTREE)
27 :     CFLAGS += -mno-cygwin
28 : Isibaar 1859 CFLAGS += -D_WIN32_IE=0x0501
29 : edgomez 1382
30 :     ##############################################################################
31 :     # Optional Compiler options
32 :     ##############################################################################
33 :    
34 :     CFLAGS += -Wall
35 :     CFLAGS += -O2
36 :     CFLAGS += -fstrength-reduce
37 :     CFLAGS += -finline-functions
38 :     CFLAGS += -fgcse
39 :     CFLAGS += -ffast-math
40 :    
41 :     ##############################################################################
42 :     # Compiler flags for linking stage
43 :     ##############################################################################
44 :    
45 : edgomez 1398 # LDFLAGS +=
46 : edgomez 1382
47 :     ##############################################################################
48 :     # Rules
49 :     ##############################################################################
50 :    
51 :     OBJECTS = $(SRC_C:.c=.obj)
52 :     OBJECTS+= $(SRC_RES:.rc=.obj)
53 :    
54 :     .SUFFIXES: .obj .rc .c
55 :    
56 :     BUILD_DIR = =build
57 :     VPATH = $(SRC_DIR):$(BUILD_DIR)
58 :    
59 :     all: $(LIBSO)
60 :    
61 :     $(BUILD_DIR):
62 :     @echo " D: $(BUILD_DIR)"
63 :     @mkdir -p $(BUILD_DIR)
64 :    
65 :     .rc.obj:
66 :     @echo " W: $(@D)/$(<F)"
67 :     @mkdir -p $(BUILD_DIR)/$(@D)
68 :     @$(WINDRES) \
69 :     --include-dir=$(SRC_DIR) \
70 :     --input-format=rc \
71 :     --output-format=coff \
72 :     -o $(BUILD_DIR)/$@ $<
73 :    
74 :     .c.obj:
75 :     @echo " C: $(@D)/$(<F)"
76 :     @mkdir -p $(BUILD_DIR)/$(@D)
77 :     @$(CC) $(CFLAGS) -c -o $(BUILD_DIR)/$@ $<
78 :    
79 :     $(LIBSO): $(BUILD_DIR) $(OBJECTS)
80 :     @echo " L: $(@F)"
81 :     @cp $(SRC_DIR)/driverproc.def $(BUILD_DIR)/driverproc.def
82 :     @cd $(BUILD_DIR) && \
83 :     $(CC) $(LDFLAGS) \
84 :     -mno-cygwin -shared -Wl,-dll,--out-implib,$@.a,--enable-stdcall-fixup \
85 :     -o $@ \
86 :     $(OBJECTS) driverproc.def \
87 : edgomez 1398 -lgdi32 -lwinmm -lcomdlg32 -lcomctl32
88 : edgomez 1382
89 :     clean:
90 :     @echo " Cl: Object files and target lib"
91 :     @$(RM) $(BUILD_DIR)
92 :    
93 :     install:
94 :     @echo " I: xvid.dll"
95 :     @cp $(BUILD_DIR)/$(LIBSO) $(LIBSO)
96 :     @rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 ./xvid.inf
97 :     @rm $(LIBSO)
98 :    
99 :     uninstall:
100 :     @rundll32.exe setupapi,InstallHinfSection Remove_XviD 132 ./xvid.inf

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4