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
|
2005-03-05 11:47:42 +01:00
|
|
|
# APPMODE : program mode (-mwindows,-mconsole)
|
2000-11-11 00:35:20 +01:00
|
|
|
# EXTRALIBS : extra libraries to link in (optional)
|
|
|
|
# EXTRADEFS : extra symbol definitions, like -DWINELIB (optional)
|
|
|
|
#
|
|
|
|
# plus all variables required by the global Make.rules.in
|
|
|
|
#
|
|
|
|
|
2003-09-24 21:01:44 +02:00
|
|
|
DLLFLAGS = @DLLFLAGS@
|
2012-01-20 13:14:16 +01:00
|
|
|
DEFS = -DWINE_STRICT_PROTOTYPES -DWINE_NO_UNICODE_MACROS $(EXTRADEFS)
|
2009-05-30 15:24:07 +02:00
|
|
|
ALL_LIBS = $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(EXTRALIBS) -lwine $(LIBPORT) $(LDFLAGS) $(LIBS)
|
2009-08-18 11:33:26 +02:00
|
|
|
INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(dlldir) $(DESTDIR)$(fakedlldir) $(DESTDIR)$(mandir)/man$(prog_manext)
|
2000-11-11 00:35:20 +01:00
|
|
|
|
|
|
|
@MAKE_RULES@
|
|
|
|
|
2009-08-18 11:29:35 +02:00
|
|
|
all: $(MODULE)$(DLLEXT) $(MODULE)$(FAKEEXT)
|
2002-05-12 05:16:39 +02:00
|
|
|
|
2009-08-18 11:29:35 +02:00
|
|
|
$(MODULE) $(MODULE).so $(MODULE).fake: $(OBJS) Makefile.in
|
2009-06-02 15:50:57 +02:00
|
|
|
$(WINEGCC) $(APPMODE) $(OBJS) -o $@ $(ALL_LIBS) $(DELAYIMPORTS:%=-Wb,-d%)
|
2000-11-11 00:35:20 +01:00
|
|
|
|
|
|
|
# Rules for installation
|
|
|
|
|
2009-08-18 11:33:26 +02:00
|
|
|
.PHONY: install_prog install_prog.so install_prog.fake
|
2002-05-12 05:16:39 +02:00
|
|
|
|
2006-08-07 17:48:18 +02:00
|
|
|
install_prog.so: $(MODULE).so $(DESTDIR)$(dlldir) dummy
|
2006-02-14 13:51:38 +01:00
|
|
|
$(INSTALL_PROGRAM) $(MODULE).so $(DESTDIR)$(dlldir)/$(MODULE).so
|
2000-11-11 00:35:20 +01:00
|
|
|
|
2009-08-18 11:33:26 +02:00
|
|
|
install_prog.fake: $(MODULE).fake $(DESTDIR)$(fakedlldir) dummy
|
|
|
|
$(INSTALL_DATA) $(MODULE).fake $(DESTDIR)$(fakedlldir)/$(MODULE)
|
|
|
|
|
2006-08-07 17:48:18 +02:00
|
|
|
install_prog: $(MODULE) $(DESTDIR)$(bindir) dummy
|
2006-02-14 13:51:38 +01:00
|
|
|
$(INSTALL_PROGRAM) $(MODULE) $(DESTDIR)$(bindir)/$(MODULE)
|
2002-05-12 05:16:39 +02:00
|
|
|
|
2009-08-18 11:33:26 +02:00
|
|
|
install install-lib:: install_prog$(DLLEXT) install_prog$(FAKEEXT)
|
2002-05-12 05:16:39 +02:00
|
|
|
|
2009-08-18 11:33:26 +02:00
|
|
|
uninstall::
|
|
|
|
$(RM) $(DESTDIR)$(bindir)/$(MODULE) $(DESTDIR)$(dlldir)/$(MODULE)$(DLLEXT) $(DESTDIR)$(fakedlldir)/$(MODULE)
|
2000-11-11 00:35:20 +01:00
|
|
|
|
|
|
|
clean::
|
2009-02-23 17:15:14 +01:00
|
|
|
$(RM) $(MODULE)
|