[svn] / trunk / xvidcore / dshow / Makefile Repository:
ViewVC logotype

Annotation of /trunk/xvidcore/dshow/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1503 - (view) (download)

1 : suxen_drol 1503 ##############################################################################
2 :     #
3 :     # Makefile for XviD DirectShow driver
4 :     #
5 :     # Adapted from XviD VFW driver makefile.
6 :     # Modified by : Peter Ross <pross@xvid.org>
7 :     #
8 :     # Requires GNU Make because of shell expansion performed at a bad time with
9 :     # other make programs (even using := variable assignments)
10 :     #
11 :     # $Id: Makefile,v 1.1 2004-07-18 02:00:05 suxen_drol Exp $
12 :     ##############################################################################
13 :    
14 :     include sources.inc
15 :    
16 :     ##############################################################################
17 :     # DXTREE must point to the DirectShow SDK root directory.
18 :     ##############################################################################
19 :     DXTREE=/c/DXVCSDK
20 :    
21 :     MAKEFILE_PWD:=$(shell pwd)
22 :     LOCAL_XVID_SRCTREE:=$(MAKEFILE_PWD)/../src
23 :     LOCAL_XVID_BUILDTREE:=$(MAKEFILE_PWD)/../build/generic/=build
24 :    
25 :     RM = rm -rf
26 :     WINDRES=windres
27 :    
28 :     # Constants which should not be modified
29 :     # The `mingw-runtime` package is required when building with -mno-cygwin
30 :     CFLAGS += -mthreads
31 :     CFLAGS += -I$(SRC_DIR)/w32api -I$(LOCAL_XVID_SRCTREE)
32 :     CFLAGS += -D_WIN32_IE=0x0500
33 :     CFLAGS += -mno-cygwin
34 :    
35 :     ## for some unknown reason, xvid.ax crashes if -g is not specified.
36 :     ## maybe a gcc-3.2.3 issue
37 :     CXXFLAGS +=-g -mthreads
38 :     CXXFLAGS += -DRELEASE \
39 :     -I$(LOCAL_XVID_SRCTREE) \
40 :     -I$(DXTREE)/Include \
41 :     -I$(DXTREE)/samples/MultiMedia/DirectShow/BaseClasses \
42 :     -include $(DXTREE)/mingw_dshow_port.h
43 :     CXXFLAGS += -mno-cygwin
44 :    
45 :     ##############################################################################
46 :     # Optional Compiler options
47 :     ##############################################################################
48 :    
49 :     CFLAGS += -Wall
50 :     CFLAGS += -O2
51 :     CFLAGS += -fstrength-reduce
52 :     CFLAGS += -finline-functions
53 :     CFLAGS += -fgcse
54 :     CFLAGS += -freduce-all-givs
55 :     CFLAGS += -ffast-math
56 :    
57 :     CXXFLAGS += -O2
58 :    
59 :     ##############################################################################
60 :     # Compiler flags for linking stage
61 :     ##############################################################################
62 :    
63 :     #LDFLAGS +=
64 :    
65 :     ##############################################################################
66 :     # Rules
67 :     ##############################################################################
68 :    
69 :     OBJECTS = $(SRC_C:.c=.obj)
70 :     OBJECTS+= $(SRC_CPP:.cpp=.obj)
71 :     OBJECTS+= $(SRC_RES:.rc=.obj)
72 :    
73 :     .SUFFIXES: .obj .rc .c
74 :    
75 :     BUILD_DIR = =build
76 :     VPATH = $(SRC_DIR):$(BUILD_DIR)
77 :    
78 :     all: $(LIBSO)
79 :    
80 :     $(BUILD_DIR):
81 :     @echo " D: $(BUILD_DIR)"
82 :     @mkdir -p $(BUILD_DIR)
83 :    
84 :     .rc.obj:
85 :     @echo " W: $(@D)/$(<F)"
86 :     @mkdir -p $(BUILD_DIR)/$(@D)
87 :     @$(WINDRES) \
88 :     --include-dir=$(SRC_DIR) \
89 :     --input-format=rc \
90 :     --output-format=coff \
91 :     -o $(BUILD_DIR)/$@ $<
92 :    
93 :     .c.obj:
94 :     @echo " C: $(@D)/$(<F)"
95 :     @mkdir -p $(BUILD_DIR)/$(@D)
96 :     @$(CC) $(CFLAGS) -c -o $(BUILD_DIR)/$@ $<
97 :    
98 :     .cpp.obj:
99 :     @echo " C: $(@D)/$(<F)"
100 :     @mkdir -p $(BUILD_DIR)/$(@D)
101 :     @$(CXX) $(CXXFLAGS) -c -o $(BUILD_DIR)/$@ $<
102 :    
103 :     $(LIBSO): $(BUILD_DIR) $(OBJECTS)
104 :     @echo " L: $(@F)"
105 :     @cp $(SRC_DIR)/xvid.ax.def $(BUILD_DIR)/xvid.ax.def
106 :     @cd $(BUILD_DIR) && \
107 :     $(CC) $(LDFLAGS) \
108 :     -mno-cygwin -shared -Wl,-dll,--out-implib,$@.a,--enable-stdcall-fixup \
109 :     -o $@ \
110 :     $(OBJECTS) xvid.ax.def \
111 :     -L$(DXTREE)/Lib -lstrmiids \
112 :     $(DXTREE)/samples/Multimedia/DirectShow/BaseClasses/strmbase.a \
113 :     -luuid -lwinmm -lole32 -loleaut32 -lcomctl32 -lstdc++
114 :    
115 :    
116 :     clean:
117 :     @echo " Cl: Object files and target lib"
118 :     @$(RM) $(BUILD_DIR)
119 :    
120 :     install:
121 :    
122 :     uninstall:

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