1
##############################################################################
3
# Makefile for x264 VFW driver
5
# Author: XviD project:
6
# - Milan Cutka <cutka at szm.sk>,
7
# - Edouard Gomez <ed.gomez at free.fr>
8
# - Peter Ross <pross@xvid.org>
9
# Ported to x264 by Laurent Aimar <fenrir@via.ecp.fr>
11
# $Id: Makefile,v 1.1 2004/06/03 19:29:33 fenrir Exp $
12
##############################################################################
19
# Installer executable
25
# Path to include filen library and src
26
DIR_INC=$(DIR_CUR)/../../..
27
DIR_LIB=$(DIR_CUR)/../../..
28
DIR_SRC=$(DIR_CUR)/../..
31
SRC_C= codec.c config.c driverproc.c
38
##############################################################################
40
##############################################################################
42
# Constants which should not be modified
43
# The `mingw-runtime` package is required when building with -mno-cygwin
44
CFLAGS += -I$(DIR_SRC)/w32api -I$(DIR_INC)
45
CFLAGS += -D_WIN32_IE=0x0500
48
# Optional Compiler options
52
##############################################################################
53
# Compiler flags for linking stage
54
##############################################################################
56
LDFLAGS += -L$(DIR_LIB) -lx264
58
##############################################################################
60
##############################################################################
62
OBJECTS = $(SRC_C:.c=.obj)
63
OBJECTS+= $(SRC_RES:.rc=.obj)
65
.SUFFIXES: .obj .rc .c
67
DIR_BUILD= $(DIR_CUR)/bin
68
VPATH = $(DIR_SRC):$(DIR_BUILD)
73
@echo " D: $(DIR_BUILD)"
74
@mkdir -p $(DIR_BUILD)
77
@echo " W: $(@D)/$(<F)"
78
@mkdir -p $(DIR_BUILD)/$(@D)
80
--include-dir=$(DIR_SRC) \
82
--output-format=coff \
86
@echo " C: $(@D)/$(<F)"
87
@mkdir -p $(DIR_BUILD)/$(@D)
88
@$(CC) $(CFLAGS) -c -o $(DIR_BUILD)/$@ $<
90
$(DLL): $(DIR_BUILD) $(OBJECTS)
92
@cp $(DIR_SRC)/driverproc.def $(DIR_BUILD)/driverproc.def
95
-mno-cygwin -shared -Wl,-dll,--out-implib,$@.a,--enable-stdcall-fixup \
97
$(OBJECTS) driverproc.def \
98
-lgdi32 -lwinmm -lcomdlg32 -lcomctl32 $(LDFLAGS)
101
@echo " Cl: Object files and target lib"
105
@echo " I: x264vfw.dll"
106
@cp $(DIR_BUILD)/$(DLL) $(DLL)
107
@cp $(DIR_SRC)/build/win32/bin/x264vfw.inf .
108
@rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 $(DIR_CUR)/x264vfw.inf
113
@echo " U: x264vfw.dll"
114
@cp $(DIR_SRC)/build/win32/bin/x264vfw.inf .
115
@rundll32.exe setupapi,InstallHinfSection Remove_x264 132 $(DIR_CUR)/x264vfw.inf
118
##############################################################################
119
# Builds the NSIS installer script for Windows.
120
# NSIS 2.x is required and makensis.exe should be in the path
121
##############################################################################
123
build-installer: $(DLL)
124
@cp $(DIR_BUILD)/$(DLL) $(DIR_SRC)/installer
125
@makensis $(DIR_SRC)/installer/x264-conf.nsi
126
@mv $(DIR_SRC)/installer/$(INST_EXE) $(DIR_BUILD)
127
@rm $(DIR_SRC)/installer/$(DLL)