2000-11-11 00:35:20 +01:00
|
|
|
# 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
|
|
|
|
#
|
|
|
|
|
2001-11-24 18:07:08 +01:00
|
|
|
DEFS = @DLLFLAGS@ -DSTRICT -DNONAMELESSUNION -DNONAMELESSSTRUCT $(EXTRADEFS)
|
2000-11-11 00:35:20 +01:00
|
|
|
LDDLLFLAGS = @LDDLLFLAGS@
|
2000-12-02 21:38:47 +01:00
|
|
|
ALL_OBJS = $(MODULE).spec.o $(OBJS)
|
2000-12-06 01:05:14 +01:00
|
|
|
ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBS)
|
2000-11-11 00:35:20 +01:00
|
|
|
SYMBOLFILE = $(MODULE).tmp.o
|
|
|
|
|
|
|
|
all: $(MODULE)
|
|
|
|
|
|
|
|
@MAKE_RULES@
|
|
|
|
|
|
|
|
# Rules for main module
|
|
|
|
|
|
|
|
$(MODULE).so: $(ALL_OBJS) Makefile.in
|
|
|
|
$(LDSHARED) $(LDDLLFLAGS) $(ALL_OBJS) -o $@ $(ALL_LIBS)
|
|
|
|
|
|
|
|
$(MODULE): $(MODULE).so
|
|
|
|
$(RM) $(MODULE) && $(LN_S) $(TOPOBJDIR)/wine $(MODULE)
|
|
|
|
|
|
|
|
# Rules for checking that no imports are missing
|
|
|
|
|
|
|
|
checklink:: $(MODULE).so
|
|
|
|
$(CC) -o checklink $(TOPSRCDIR)/library/checklink.c $(MODULE).so $(ALL_LIBS) && $(RM) checklink
|
|
|
|
|
|
|
|
# Rules for debug channels
|
|
|
|
|
|
|
|
debug_channels: dummy
|
|
|
|
$(TOPSRCDIR)/tools/make_debug $(MODULE).spec $(C_SRCS)
|
|
|
|
|
|
|
|
# Rules for installation
|
|
|
|
|
|
|
|
install:: $(MODULE).so
|
|
|
|
[ -d $(bindir) ] || $(MKDIR) $(bindir)
|
|
|
|
$(INSTALL_PROGRAM) $(MODULE).so $(bindir)/$(MODULE).so
|
2000-12-11 00:11:41 +01:00
|
|
|
cd $(bindir) && $(RM) $(MODULE) && $(LN_S) wine $(MODULE)
|
2000-11-11 00:35:20 +01:00
|
|
|
|
|
|
|
uninstall::
|
|
|
|
cd $(bindir) && $(RM) $(MODULE) $(MODULE).so
|
|
|
|
|
|
|
|
clean::
|
|
|
|
$(RM) $(MODULE)
|