Better ComboBoxEx placement.
[wine/multimedia.git] / Make.rules.in
blobd49c32164e4dd124ed858d7b7d8787f0943bca6d
1 # Global rules shared by all makefiles     -*-Makefile-*-
3 # Each individual makefile should 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
8 # C_SRCS       : C sources for the module (optional)
9 # ASM_SRCS     : assembly sources (optional)
10 # GEN_ASM_SRCS : generated assembly sources (optional)
11 # RC_SRCS      : resource source files (optional)
12 # EXTRA_SRCS   : extra source files for make depend (optional)
13 # EXTRA_OBJS   : extra object files (optional)
14 # WRCEXTRA     : extra wrc flags (e.g. '-p _SysRes') (optional)
16 # First some useful definitions
18 SHELL     = /bin/sh
19 CC        = @CC@
20 CPP       = @CPP@
21 CFLAGS    = @CFLAGS@
22 OPTIONS   = @OPTIONS@ -D_REENTRANT
23 X_CFLAGS  = @X_CFLAGS@
24 X_LIBS    = @X_LIBS@
25 XLIB      = @X_PRE_LIBS@ @XLIB@ @X_EXTRA_LIBS@
26 WINELIB   = $(WINESTUB) -L$(TOPOBJDIR) -lwine
27 LIBS      = @LIBS@
28 YACC      = @YACC@
29 LEX       = @LEX@
30 LEXLIB    = @LEXLIB@
31 RANLIB    = @RANLIB@
32 LN_S      = @LN_S@
33 DIVINCL   = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include
34 ALLCFLAGS = $(CFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL) $(X_CFLAGS)
35 LDCOMBINE = ld -r
36 LDSHARED  = @LDSHARED@
37 AR        = ar rc
38 RM        = rm -f
39 MKDIR     = mkdir -p
40 C2MAN     = @C2MAN@
41 LDCONFIG  = @LDCONFIG@
42 MANSPECS  = -w $(TOPSRCDIR)/relay32/gdi32.spec \
43             -w $(TOPSRCDIR)/relay32/user32.spec \
44             -w $(TOPSRCDIR)/relay32/comctl32.spec \
45             -w $(TOPSRCDIR)/relay32/comdlg32.spec \
46             -w $(TOPSRCDIR)/relay32/kernel32.spec 
47 LINT      = lclint
48 LINTFLAGS = +posixlib +gnuextensions +trytorecover
49 BUILD     = $(TOPOBJDIR)/tools/build@PROGEXT@
50 MAKEDEP   = $(TOPOBJDIR)/tools/makedep@PROGEXT@
51 WINERC    = $(TOPOBJDIR)/rc/winerc@PROGEXT@
52 WRC       = $(TOPOBJDIR)/tools/wrc/wrc@PROGEXT@
53 WRCFLAGS  = -c
54 WINESTUB  = $(TOPOBJDIR)/library/winestub.o
55 SUBMAKE   = $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'OPTIONS=$(OPTIONS)'
56 @SET_MAKE@
58 # Installation infos
60 INSTALL         = @INSTALL@
61 INSTALL_PROGRAM = @INSTALL_PROGRAM@
62 INSTALL_DATA    = @INSTALL_DATA@
63 prefix          = @prefix@
64 exec_prefix     = @exec_prefix@
65 bindir          = @bindir@
66 libdir          = @libdir@
67 infodir         = @infodir@
68 mandir          = @mandir@/man1
69 manext          = .1
70 includedir      = @includedir@/wine
72 OBJS = $(C_SRCS:.c=.o) $(GEN_ASM_SRCS:.s=.o) $(ASM_SRCS:.S=.o) \
73        $(RC_SRCS:.rc=.o) $(EXTRA_OBJS)
75 # Implicit rules
77 .SUFFIXES: .rc .res
79 .c.o:
80         $(CC) -c $(ALLCFLAGS) -o $*.o $<
82 .s.o:
83         $(AS) -o $*.o $<  
85 .S.o:
86         $(CC) -c -o $*.o $<  
88 .rc.s:
89         $(WRC) $(WRCFLAGS) $(WRCEXTRA) $(DIVINCL) $<
91 .rc.h:
92         $(WRC) $(WRCFLAGS) $(WRCEXTRA) $(DIVINCL) -nh $<
94 .rc.res:
95         $(WRC) $(WRCFLAGS) $(WRCEXTRA) $(DIVINCL) -r $<
97 .res.s:
98         $(WRC) $(WRCFLAGS) $(WRCEXTRA) -b $<
100 .res.h:
101         $(WRC) $(WRCFLAGS) $(WRCEXTRA) -bnh $<
104 # Rule to rebuild the resource compiler
106 $(WINERC) check_winerc:
107         cd $(TOPOBJDIR)/rc; $(SUBMAKE) winerc@PROGEXT@
109 $(WRC) check_wrc:
110         cd $(TOPOBJDIR)/tools/wrc; $(SUBMAKE) wrc@PROGEXT@
112 # Rule to rebuild the 'makedep' program
114 $(MAKEDEP) check_makedep:
115         cd $(TOPOBJDIR)/tools; $(SUBMAKE) makedep@PROGEXT@
117 # Rule to rebuild the 'build' program
119 $(BUILD) checkbuild:
120         cd $(TOPOBJDIR)/tools; $(SUBMAKE) build@PROGEXT@
122 # Rule for main module
124 $(MODULE).o: $(OBJS)
125         $(LDCOMBINE) $(OBJS) -o $(MODULE).o
127 # Rules for makefile
129 Makefile: Makefile.in $(TOPSRCDIR)/configure
130         @echo Makefile is older than $?, please rerun $(TOPSRCDIR)/configure
131         @exit 1
133 all: Makefile
135 # Rules for auto documentation
137 man: $(C_SRCS)
138         for i in $(C_SRCS); do $(C2MAN) -L -o $(TOPOBJDIR)/documentation/man3w -S3w $(DIVINCL) -D__WINE__ $(MANSPECS) $$i; done
140 html: $(C_SRCS)
141         for i in $(C_SRCS); do $(C2MAN) -L -o $(TOPOBJDIR)/documentation/html -Th -iwindows.h  $(DIVINCL) -D__WINE__ $(MANSPECS) $$i; done
143 # Rule for linting
145 lint:
146         for i in $(C_SRCS); do $(LINT) $(LINTFLAGS) -D__WINE__ $(OPTIONS) $(DIVINCL) $(X_CFLAGS) $$i; done
148 # Misc. rules
150 depend:: $(MAKEDEP) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
151         $(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
153 clean::
154         $(RM) *.o \#*\# *~ *% .#* *.bak *.orig *.rej *.flc y.tab.c y.tab.h lex.yy.c core $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.s) $(RC_SRCS:.rc=.h) $(PROGRAMS)
156 dummy:
158 # End of global rules