| # Global rules for building a Winelib program -*-Makefile-*- |
| # Each individual makefile should define the following variables: |
| # MODULE : name of the main module being built |
| # EXTRALIBS : extra libraries to link in (optional) |
| # EXTRADEFS : extra symbol definitions, like -DWINELIB (optional) |
| # plus all variables required by the global Make.rules.in |
| DEFS = @DLLFLAGS@ $(EXTRADEFS) |
| LDDLLFLAGS = @LDDLLFLAGS@ |
| ALL_OBJS = $(MODULE).spec.o $(OBJS) |
| ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBS) |
| SYMBOLFILE = $(MODULE).tmp.o |
| $(MODULE).so: $(ALL_OBJS) Makefile.in |
| $(LDSHARED) $(LDDLLFLAGS) $(ALL_OBJS) -o $@ $(ALL_LIBS) |
| $(RM) $(MODULE) && $(LN_S) $(TOPOBJDIR)/wine $(MODULE) |
| # Rules for checking that no imports are missing |
| $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c $(MODULE).so $(ALL_LIBS) && $(RM) checklink |
| # Rules for debug channels |
| $(TOPSRCDIR)/tools/make_debug $(MODULE).spec $(C_SRCS) |
| [ -d $(bindir) ] || $(MKDIR) $(bindir) |
| $(INSTALL_PROGRAM) $(MODULE).so $(bindir)/$(MODULE).so |
| cd $(bindir) && $(RM) $(MODULE) && $(LN_S) wine $(MODULE) |
| cd $(bindir) && $(RM) $(MODULE) $(MODULE).so |