Improved NLS file for codepage 932 (SJIS).
[wine/dcerpc.git] / programs / Makeprog.rules.in
blob3c1b3ee6750fc95f67890b7bc97387b7f68df4ce
1 # Global rules for building a Winelib program     -*-Makefile-*-
3 # Each individual makefile should define the following variables:
4 # MODULE       : name of the main module being built
5 # APPMODE      : program mode (cui,gui,cuiw,guiw)
6 # EXTRALIBS    : extra libraries to link in (optional)
7 # EXTRADEFS    : extra symbol definitions, like -DWINELIB (optional)
9 # plus all variables required by the global Make.rules.in
12 DEFS        = @DLLFLAGS@ -DSTRICT -DNONAMELESSUNION -DNONAMELESSSTRUCT $(EXTRADEFS)
13 LDDLLFLAGS  = @LDDLLFLAGS@
14 ALL_LIBS    = $(LIBWINE) $(EXTRALIBS) $(LIBS)
15 SYMBOLFILE  = $(MODULE).tmp.o
16 TESTIMPORTS = $(DELAYIMPORTS) $(IMPORTS)
17 RCOBJS      = $(RC_SRCS:.rc=.res.o)
19 @MAKE_RULES@
21 all: $(MODULE)$(EXEEXT)
23 # Rule for main module spec file
25 $(MODULE).spec.c: $(RC_SRCS:.rc=.res) $(SYMBOLFILE) $(WINEBUILD)
26         $(LDPATH) $(WINEBUILD) @DLLFLAGS@ $(SYMBOLFILE:%=-sym %) -o $@ -exe $(MODULE) $(APPMODE:%=-m%) $(RC_SRCS:%.rc=-res %.res) -L$(DLLDIR) $(DELAYIMPORTS:%=-dl%) $(IMPORTS:%=-l%)
28 # Rules for .so main module
30 $(MODULE).so: $(MODULE).spec.o $(OBJS) Makefile.in
31         $(LDSHARED) $(LDDLLFLAGS) $(MODULE).spec.o $(OBJS) -o $@ $(ALL_LIBS)
33 $(MODULE): $(MODULE).so
34         $(RM) $(MODULE) && $(LN_S) $(TOPOBJDIR)/wine $(MODULE)
36 # Rules for .exe main module
38 $(MODULE).exe: $(OBJS) $(RCOBJS) Makefile.in
39         $(CC) $(OBJS) $(RCOBJS) -o $@ $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(ALL_LIBS)
41 # Rules for checking that no imports are missing
43 checklink:: $(MODULE).so
44         $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c $(MODULE).so && $(RM) checklink
46 # Rules for testing
48 $(TESTRESULTS): $(MODULE).so
50 # Rules for debug channels
52 debug_channels: dummy
53         $(TOPSRCDIR)/tools/make_debug $(MODULE).spec $(C_SRCS)
55 # Rules for installation
57 .PHONY: install_prog$(EXEEXT)
59 install_prog:: $(MODULE).so
60         $(MKINSTALLDIRS) $(bindir)
61         $(INSTALL_PROGRAM) $(MODULE).so $(bindir)/$(MODULE).so
62         cd $(bindir) && $(RM) $(MODULE) && $(LN_S) wine $(MODULE)
64 install_prog.exe:: $(MODULE).exe
65         $(MKINSTALLDIRS) $(bindir)
66         $(INSTALL_PROGRAM) $(MODULE).exe $(bindir)/$(MODULE).exe
68 install:: install_prog$(EXEEXT)
70 uninstall::
71         $(RM) $(bindir)/$(MODULE)$(EXEEXT) $(bindir)/$(MODULE).so
73 clean::
74         $(RM) $(MODULE)$(EXEEXT)