Parent Directory | Revision Log
Revision 1184 - (view) (download)
1 : | edgomez | 1184 | ############################################################################## |
2 : | # | ||
3 : | # Makefile for XviD VFW driver | ||
4 : | # | ||
5 : | # Author : ??? <cutka at szm.sk> | ||
6 : | # Modified by : Edouard Gomez <ed.gomez at free.fr> | ||
7 : | # Peter Ross <pross@xvid.org> | ||
8 : | # | ||
9 : | # $Id: Makefile,v 1.1.2.1 2003-10-22 09:52:58 edgomez Exp $ | ||
10 : | ############################################################################## | ||
11 : | |||
12 : | include sources.inc | ||
13 : | |||
14 : | PWD=$(shell pwd) | ||
15 : | LOCAL_XVID_SRCTREE=$(PWD)/../../src | ||
16 : | LOCAL_XVID_BUILDTREE=$(PWD)/../../build/generic/=build | ||
17 : | |||
18 : | RM = rm -rf | ||
19 : | WINDRES=windres | ||
20 : | |||
21 : | # Constants which should not be modified | ||
22 : | # The `mingw-runtime` package is required when building with -mno-cygwin | ||
23 : | CFLAGS += -I$(SRC_DIR)/w32api -I$(LOCAL_XVID_SRCTREE) | ||
24 : | CFLAGS += -D_WIN32_IE=0x0500 | ||
25 : | CFLAGS += -mno-cygwin | ||
26 : | |||
27 : | ############################################################################## | ||
28 : | # Optional Compiler options | ||
29 : | ############################################################################## | ||
30 : | |||
31 : | CFLAGS += -Wall | ||
32 : | CFLAGS += -O1 | ||
33 : | CFLAGS += -fstrength-reduce | ||
34 : | CFLAGS += -finline-functions | ||
35 : | CFLAGS += -fgcse | ||
36 : | CFLAGS += -freduce-all-givs | ||
37 : | CFLAGS += -ffast-math | ||
38 : | |||
39 : | ############################################################################## | ||
40 : | # Rules | ||
41 : | ############################################################################## | ||
42 : | |||
43 : | OBJECTS = $(SRC_C:.c=.obj) | ||
44 : | OBJECTS+= $(SRC_RES:.rc=.obj) | ||
45 : | |||
46 : | .SUFFIXES: .obj .rc .c | ||
47 : | |||
48 : | BUILD_DIR = =build | ||
49 : | VPATH = $(SRC_DIR):$(BUILD_DIR) | ||
50 : | |||
51 : | all: $(LIBSO) | ||
52 : | |||
53 : | $(BUILD_DIR): | ||
54 : | @echo " D: $(BUILD_DIR)" | ||
55 : | @mkdir -p $(BUILD_DIR) | ||
56 : | |||
57 : | .rc.obj: | ||
58 : | @echo " W: $(@D)/$(<F)" | ||
59 : | @mkdir -p $(BUILD_DIR)/$(@D) | ||
60 : | @$(WINDRES) --include-dir=$(SRC_DIR) -J rc -O coff -o $(BUILD_DIR)/$@ $< | ||
61 : | |||
62 : | .c.obj: | ||
63 : | @echo " C: $(@D)/$(<F)" | ||
64 : | @mkdir -p $(BUILD_DIR)/$(@D) | ||
65 : | @$(CC) $(CFLAGS) -c -o $(BUILD_DIR)/$@ $< | ||
66 : | |||
67 : | $(LIBSO): $(BUILD_DIR) $(OBJECTS) | ||
68 : | @echo " L: $(@F)" | ||
69 : | @cp $(SRC_DIR)/driverproc.def $(BUILD_DIR)/driverproc.def | ||
70 : | @cd $(BUILD_DIR) && \ | ||
71 : | $(CC) -mno-cygwin -shared -Wl,-dll,--out-implib,$@.a,--enable-stdcall-fixup \ | ||
72 : | -o $@ \ | ||
73 : | $(OBJECTS) driverproc.def $(LOCAL_XVID_BUILDTREE)/libxvidcore.a \ | ||
74 : | -lgdi32 -lwinmm -lcomdlg32 -lcomctl32 | ||
75 : | |||
76 : | clean: | ||
77 : | @echo " Cl: Object files and target lib" | ||
78 : | @$(RM) $(BUILD_DIR) | ||
79 : | |||
80 : | install: | ||
81 : | @echo " I: xvid.dll" | ||
82 : | @cp $(BUILD_DIR)/$(LIBSO) $(LIBSO) | ||
83 : | @rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 ./xvid.inf | ||
84 : | @rm $(LIBSO) | ||
85 : | |||
86 : | uninstall: | ||
87 : | @rundll32.exe setupapi,InstallHinfSection Remove_XviD 132 ./xvid.inf |
No admin address has been configured | ViewVC Help |
Powered by ViewVC 1.0.4 |