[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 1820 - (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 1806 # $Id: Makefile,v 1.6 2008-11-27 11:57:28 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 :    
29 :     ##############################################################################
30 :     # Optional Compiler options
31 :     ##############################################################################
32 :    
33 :     CFLAGS += -Wall
34 :     CFLAGS += -O2
35 :     CFLAGS += -fstrength-reduce
36 :     CFLAGS += -finline-functions
37 :     CFLAGS += -fgcse
38 :     CFLAGS += -ffast-math
39 :    
40 :     ##############################################################################
41 :     # Compiler flags for linking stage
42 :     ##############################################################################
43 :    
44 : edgomez 1398 # LDFLAGS +=
45 : edgomez 1382
46 :     ##############################################################################
47 :     # Rules
48 :     ##############################################################################
49 :    
50 :     OBJECTS = $(SRC_C:.c=.obj)
51 :     OBJECTS+= $(SRC_RES:.rc=.obj)
52 :    
53 :     .SUFFIXES: .obj .rc .c
54 :    
55 :     BUILD_DIR = =build
56 :     VPATH = $(SRC_DIR):$(BUILD_DIR)
57 :    
58 :     all: $(LIBSO)
59 :    
60 :     $(BUILD_DIR):
61 :     @echo " D: $(BUILD_DIR)"
62 :     @mkdir -p $(BUILD_DIR)
63 :    
64 :     .rc.obj:
65 :     @echo " W: $(@D)/$(<F)"
66 :     @mkdir -p $(BUILD_DIR)/$(@D)
67 :     @$(WINDRES) \
68 :     --include-dir=$(SRC_DIR) \
69 :     --input-format=rc \
70 :     --output-format=coff \
71 :     -o $(BUILD_DIR)/$@ $<
72 :    
73 :     .c.obj:
74 :     @echo " C: $(@D)/$(<F)"
75 :     @mkdir -p $(BUILD_DIR)/$(@D)
76 :     @$(CC) $(CFLAGS) -c -o $(BUILD_DIR)/$@ $<
77 :    
78 :     $(LIBSO): $(BUILD_DIR) $(OBJECTS)
79 :     @echo " L: $(@F)"
80 :     @cp $(SRC_DIR)/driverproc.def $(BUILD_DIR)/driverproc.def
81 :     @cd $(BUILD_DIR) && \
82 :     $(CC) $(LDFLAGS) \
83 :     -mno-cygwin -shared -Wl,-dll,--out-implib,$@.a,--enable-stdcall-fixup \
84 :     -o $@ \
85 :     $(OBJECTS) driverproc.def \
86 : edgomez 1398 -lgdi32 -lwinmm -lcomdlg32 -lcomctl32
87 : edgomez 1382
88 :     clean:
89 :     @echo " Cl: Object files and target lib"
90 :     @$(RM) $(BUILD_DIR)
91 :    
92 :     install:
93 :     @echo " I: xvid.dll"
94 :     @cp $(BUILD_DIR)/$(LIBSO) $(LIBSO)
95 :     @rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 ./xvid.inf
96 :     @rm $(LIBSO)
97 :    
98 :     uninstall:
99 :     @rundll32.exe setupapi,InstallHinfSection Remove_XviD 132 ./xvid.inf

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