Do not send WM_SIZING to 16-bit windows.
[wine/multimedia.git] / Make.rules.in
blobe296a443723b0555ae90bfec7dfb33fce488a5f8
1 # Global rules shared by all makefiles     -*-Makefile-*-
3 # Each individual makefile must define the following variables:
4 # TOPSRCDIR    : top-level source directory
5 # TOPOBJDIR    : top-level object directory
6 # SRCDIR       : source directory for this module
7 # MODULE       : name of the module being built
9 # Each individual makefile may define the following additional variables:
10 # C_SRCS       : C sources for the module
11 # ASM_SRCS     : assembly sources
12 # GEN_ASM_SRCS : generated assembly sources
13 # RC_SRCS      : resource source files
14 # SPEC_SRCS    : interface definition files
15 # GLUE         : C sources for which glue code needs to be generated
16 # EXTRA_SRCS   : extra source files for make depend
17 # EXTRA_OBJS   : extra object files
18 # WRCEXTRA     : extra wrc flags (e.g. '-p _SysRes')
19 # SUBDIRS      : subdirectories that contain a Makefile
20 # EXTRASUBDIRS : subdirectories that do not contain a Makefile
22 # First some useful definitions
24 SHELL     = /bin/sh
25 CC        = @CC@
26 CPP       = @CPP@
27 CFLAGS    = @CFLAGS@
28 OPTIONS   = @OPTIONS@ -D_REENTRANT
29 X_CFLAGS  = @X_CFLAGS@
30 X_LIBS    = @X_LIBS@
31 XLIB      = @X_PRE_LIBS@ @XLIB@ @X_EXTRA_LIBS@
32 DLL_LINK  = @DLL_LINK@
33 LIBS      = @LIBS@
34 YACC      = @YACC@
35 LEX       = @LEX@
36 LEXLIB    = @LEXLIB@
37 RANLIB    = @RANLIB@
38 LN_S      = @LN_S@
39 DIVINCL   = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include
40 ALLCFLAGS = $(DIVINCL) $(CFLAGS) $(DEFS) $(OPTIONS) $(X_CFLAGS)
41 LDCOMBINE = ld -r
42 AR        = ar rc
43 RM        = rm -f
44 MV        = mv
45 MKDIR     = mkdir -p
46 C2MAN     = @C2MAN@
47 MANSPECS  = -w $(TOPSRCDIR)/relay32/gdi32.spec \
48             -w $(TOPSRCDIR)/relay32/user32.spec \
49             -w $(TOPSRCDIR)/relay32/comctl32.spec \
50             -w $(TOPSRCDIR)/relay32/comdlg32.spec \
51             -w $(TOPSRCDIR)/relay32/kernel32.spec 
52 LINT      = @LINT@
53 LINTFLAGS = @LINTFLAGS@
54 ALLLINTFLAGS = $(LINTFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL)
55 WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi_check/winapi_check
56 BUILD     = $(TOPOBJDIR)/tools/build@PROGEXT@
57 MAKEDEP   = $(TOPOBJDIR)/tools/makedep@PROGEXT@
58 WRC       = $(TOPOBJDIR)/tools/wrc/wrc@PROGEXT@
59 WRCFLAGS  = -c
60 DLLDIR    = $(TOPOBJDIR)/dlls
61 @SET_MAKE@
63 # Installation infos
65 INSTALL         = @INSTALL@
66 INSTALL_PROGRAM = @INSTALL_PROGRAM@
67 INSTALL_DATA    = @INSTALL_DATA@
68 prefix          = @prefix@
69 exec_prefix     = @exec_prefix@
70 bindir          = @bindir@
71 libdir          = @libdir@
72 infodir         = @infodir@
73 mandir          = @mandir@
74 prog_manext     = 1
75 conf_manext     = 5
76 includedir      = @includedir@/wine
77 CLEAN_FILES     = *.o *.a *.so *.ln \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej *.flc \
78                   *.spec.c *.glue.c y.tab.c y.tab.h lex.yy.c core
80 OBJS = $(SPEC_SRCS:.spec=.spec.o) $(C_SRCS:.c=.o) $(GEN_ASM_SRCS:.s=.o) \
81        $(ASM_SRCS:.S=.o) $(RC_SRCS:.rc=.o) $(GLUE:.c=.glue.o) $(EXTRA_OBJS)
83 LINTS = $(C_SRCS:.c=.ln)
85 # DLL list
87 X_DLLS = \
88         ddraw \
89         x11drv
91 DLLS = \
92         @X_DLLS@ \
93         avifil32 \
94         comctl32 \
95         comdlg32 \
96         dciman32 \
97         dinput \
98         dplayx \
99         dsound \
100         gdi32 \
101         icmp \
102         imagehlp \
103         imm32 \
104         joystick.drv \
105         lz32 \
106         mcianim.drv \
107         mciavi.drv \
108         mcicda.drv \
109         mciseq.drv \
110         mciwave.drv \
111         midimap.drv \
112         mpr \
113         msacm \
114         msacm.drv \
115         msacm32 \
116         msnet32 \
117         msvfw32 \
118         odbc32 \
119         ole32 \
120         oleaut32 \
121         olecli32 \
122         oledlg \
123         olepro32 \
124         olesvr32 \
125         psapi \
126         rasapi32 \
127         riched32 \
128         setupx \
129         shell32 \
130         sound \
131         stress \
132         tapi32 \
133         ttydrv \
134         urlmon \
135         user32 \
136         version \
137         w32skrnl \
138         win87em \
139         windebug \
140         wineoss.drv \
141         wing \
142         wininet \
143         winmm \
144         winspool.drv \
145         wnaspi32 \
146         wsock32
148 # Implicit rules
150 .SUFFIXES:
151 .SUFFIXES: .rc .res .spec .spec.c .spec.o .glue.c $(SUFFIXES)
153 .c.o:
154         $(CC) -c $(ALLCFLAGS) -o $*.o $<
156 .spec.c.spec.o:
157         $(CC) -c $(ALLCFLAGS) @GCC_NO_BUILTIN@ -o $*.spec.o $<
159 .s.o:
160         $(AS) -o $*.o $<  
162 .S.o:
163         $(CC) -c -o $*.o $<  
165 .rc.s:
166         $(WRC) $(WRCFLAGS) $(WRCEXTRA) $(DIVINCL) $<
168 .rc.h:
169         $(WRC) $(WRCFLAGS) $(WRCEXTRA) $(DIVINCL) -nh $<
171 .rc.res:
172         $(WRC) $(WRCFLAGS) $(WRCEXTRA) $(DIVINCL) -r $<
174 .res.s:
175         $(WRC) $(WRCFLAGS) $(WRCEXTRA) -b $<
177 .res.h:
178         $(WRC) $(WRCFLAGS) $(WRCEXTRA) -bnh $<
180 .spec.spec.c:
181         $(BUILD) @BUILDFLAGS@ -o $@ -spec $<
183 .c.glue.c:
184         $(BUILD) @BUILDFLAGS@ -o $@ -glue $<
186 .c.ln:
187         $(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 )
189 .PHONY: all install uninstall clean distclean depend dummy
191 # 'all' target first in case the enclosing Makefile didn't define any target
193 all: Makefile
195 # Rule to rebuild the resource compiler
197 $(WRC) check_wrc:
198         cd $(TOPOBJDIR)/tools/wrc && $(MAKE) wrc@PROGEXT@
200 # Rule to rebuild the 'makedep' program
202 $(MAKEDEP) check_makedep:
203         cd $(TOPOBJDIR)/tools && $(MAKE) makedep@PROGEXT@
205 # Rule to rebuild the 'build' program
207 $(BUILD) checkbuild:
208         cd $(TOPOBJDIR)/tools && $(MAKE) build@PROGEXT@
210 # Rule for main module
212 $(MODULE).o: $(OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in
213         $(LDCOMBINE) $(OBJS) -o $(MODULE).o
215 # Rules for makefile
217 Makefile: Makefile.in $(TOPSRCDIR)/configure
218         @echo Makefile is older than $?, please rerun $(TOPSRCDIR)/configure
219         @exit 1
221 # Rules for auto documentation
223 man: $(C_SRCS)
224         for i in $(C_SRCS); do $(C2MAN) -L -o $(TOPOBJDIR)/documentation/man3w -S3w $(DIVINCL) -D__WINE__ $(MANSPECS) $$i; done
226 html: $(C_SRCS)
227         for i in $(C_SRCS); do $(C2MAN) -L -o $(TOPOBJDIR)/documentation/html -Th -iwindows.h  $(DIVINCL) -D__WINE__ $(MANSPECS) $$i; done
229 # Rule for linting
231 $(MODULE).ln : $(LINTS)
232         if test "$(LINTS)" ; \
233         then \
234                 $(LINT) $(ALLLINTFLAGS) -o$(MODULE) $(LINTS) ; \
235                 $(MV) llib-l$(MODULE).ln $(MODULE).ln ; \
236         else \
237                 $(LINT) $(ALLLINTFLAGS) -C$(MODULE) /dev/null ; \
238         fi
240 lint:: $(MODULE).ln
242 # Rules for Windows API checking
244 winapi_check::
245         $(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) .
247 # Rules for dependencies
249 $(SUBDIRS:%=%/__depend__): $(MAKEDEP) dummy
250         cd `dirname $@` && $(MAKE) depend
252 depend: $(MAKEDEP) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS) $(SUBDIRS:%=%/__depend__)
253         $(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
255 # Rules for cleaning
257 $(SUBDIRS:%=%/__clean__): dummy
258         cd `dirname $@` && $(MAKE) clean
260 $(EXTRASUBDIRS:%=%/__clean__): dummy
261         -cd `dirname $@` && $(RM) $(CLEAN_FILES)
263 clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
264         $(RM) $(CLEAN_FILES) $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.s) $(RC_SRCS:.rc=.h) $(PROGRAMS)
266 # Misc. rules
268 $(SPEC_SRCS:.spec=.spec.c): $(BUILD) $(TOPSRCDIR)/include/builtin16.h $(TOPSRCDIR)/include/builtin32.h
270 $(GLUE:.c=.glue.c): $(BUILD) $(TOPSRCDIR)/include/builtin16.h $(TOPSRCDIR)/include/builtin32.h
272 $(RC_SRCS:.rc=.s): $(WRC)
274 $(SUBDIRS): dummy
275         @cd $@ && $(MAKE)
277 dummy:
279 # End of global rules