mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 12:20:07 +00:00
Made --enable-dll the default.
Use $(MAKE) instead of $(SUBMAKE) for recursive makes. Cleaned up install targets in main Makefile.
This commit is contained in:
parent
fee65e4672
commit
0adad95db3
@ -35,6 +35,7 @@ LN_S = @LN_S@
|
||||
DIVINCL = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include
|
||||
ALLCFLAGS = $(DIVINCL) $(CFLAGS) $(DEFS) $(OPTIONS) $(X_CFLAGS)
|
||||
LDCOMBINE = ld -r
|
||||
SONAME = lib$(MODULE).so
|
||||
LDSHARED = @LDSHARED@
|
||||
AR = ar rc
|
||||
RM = rm -f
|
||||
@ -53,11 +54,10 @@ ALLLINTFLAGS = $(LINTFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL)
|
||||
WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi_check/winapi_check
|
||||
BUILD = $(TOPOBJDIR)/tools/build@PROGEXT@
|
||||
MAKEDEP = $(TOPOBJDIR)/tools/makedep@PROGEXT@
|
||||
WINERC = $(TOPOBJDIR)/rc/winerc@PROGEXT@
|
||||
WRC = $(TOPOBJDIR)/tools/wrc/wrc@PROGEXT@
|
||||
WRCFLAGS = -c
|
||||
WINESTUB = $(TOPOBJDIR)/library/winestub.o
|
||||
SUBMAKE = $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'OPTIONS=$(OPTIONS)'
|
||||
DLLDIR = $(TOPOBJDIR)/dlls
|
||||
@SET_MAKE@
|
||||
|
||||
# Installation infos
|
||||
@ -123,32 +123,41 @@ LINTS = $(C_SRCS:.c=.ln)
|
||||
|
||||
# Rule to rebuild the resource compiler
|
||||
|
||||
$(WINERC) check_winerc:
|
||||
cd $(TOPOBJDIR)/rc; $(SUBMAKE) winerc@PROGEXT@
|
||||
|
||||
$(WRC) check_wrc:
|
||||
cd $(TOPOBJDIR)/tools/wrc; $(SUBMAKE) wrc@PROGEXT@
|
||||
cd $(TOPOBJDIR)/tools/wrc && $(MAKE) wrc@PROGEXT@
|
||||
|
||||
# Rule to rebuild the 'makedep' program
|
||||
|
||||
$(MAKEDEP) check_makedep:
|
||||
cd $(TOPOBJDIR)/tools; $(SUBMAKE) makedep@PROGEXT@
|
||||
cd $(TOPOBJDIR)/tools && $(MAKE) makedep@PROGEXT@
|
||||
|
||||
# Rule to rebuild the 'build' program
|
||||
|
||||
$(BUILD) checkbuild:
|
||||
cd $(TOPOBJDIR)/tools; $(SUBMAKE) build@PROGEXT@
|
||||
cd $(TOPOBJDIR)/tools && $(MAKE) build@PROGEXT@
|
||||
|
||||
# Rule to rebuild winestub.o
|
||||
|
||||
$(WINESTUB) check_winestub:
|
||||
cd $(TOPOBJDIR)/library; $(SUBMAKE) winestub.o
|
||||
cd $(TOPOBJDIR)/library && $(MAKE) winestub.o
|
||||
|
||||
# Rule for main module
|
||||
|
||||
$(MODULE).o: $(OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in
|
||||
$(LDCOMBINE) $(OBJS) -o $(MODULE).o
|
||||
|
||||
lib$(MODULE).so.$(SOVERSION): $(OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in
|
||||
$(LDSHARED) $(OBJS) -o $@
|
||||
|
||||
lib$(MODULE).so: lib$(MODULE).so.$(SOVERSION)
|
||||
$(RM) $@
|
||||
$(LN_S) $< $@
|
||||
|
||||
lib$(MODULE).a: $(OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in
|
||||
$(RM) $@
|
||||
$(AR) $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
# Rules for makefile
|
||||
|
||||
Makefile: Makefile.in $(TOPSRCDIR)/configure
|
||||
@ -193,7 +202,7 @@ depend:: $(MAKEDEP) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
|
||||
$(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
|
||||
|
||||
clean::
|
||||
$(RM) *.o *.ln \#*\# *~ *% .#* *.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) $(SPEC_SRCS:.spec=.spec.c) $(GLUE:.c=.glue.c) $(PROGRAMS)
|
||||
$(RM) *.o *.a *.so *.ln \#*\# *~ *% .\#* *.bak *.orig *.rej *.flc *.spec.c *.glue.c y.tab.c y.tab.h lex.yy.c core $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.s) $(RC_SRCS:.rc=.h) $(PROGRAMS)
|
||||
|
||||
dummy:
|
||||
|
||||
|
60
Makefile.in
60
Makefile.in
@ -14,6 +14,9 @@
|
||||
# Main target to build
|
||||
|
||||
MAIN_TARGET = @MAIN_TARGET@
|
||||
LIB_TARGET = @LIB_TARGET@
|
||||
LIB_TYPE = @LIB_TYPE@
|
||||
ALT_LINK = @ALT_LINK@
|
||||
|
||||
# Directories
|
||||
|
||||
@ -21,7 +24,8 @@ TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = .
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = none
|
||||
MODULE = wine
|
||||
SOVERSION = 1.0
|
||||
|
||||
TOOLSUBDIRS = \
|
||||
tools \
|
||||
@ -226,9 +230,7 @@ EMUOBJS = \
|
||||
debugger/debugger.o \
|
||||
miscemu/miscemu.o
|
||||
|
||||
LIB_TARGET = @LIB_TARGET@
|
||||
|
||||
ALT_LINK = @ALT_LINK@
|
||||
EXTRA_OBJS = $(LIBOBJS) $(X11OBJS)
|
||||
|
||||
all: Makefile Make.rules server $(MAIN_TARGET)
|
||||
@echo "Wine build complete."
|
||||
@ -250,8 +252,6 @@ Make.rules: Make.rules.in configure
|
||||
|
||||
install:: install_$(MAIN_TARGET)
|
||||
|
||||
uninstall:: uninstall_$(MAIN_TARGET)
|
||||
|
||||
emu: wine
|
||||
|
||||
lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
|
||||
@ -260,61 +260,47 @@ wine wine.sym: $(LIB_TARGET) $(EMUOBJS) $(X11OBJS) $(LIBOBJS)
|
||||
$(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
|
||||
nm -n wine | grep -v _compiled >wine.sym
|
||||
|
||||
libwine.a: $(LIBOBJS) $(X11OBJS)
|
||||
$(RM) $@
|
||||
$(AR) $@ $(LIBOBJS) $(X11OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
llib-lwine.ln : $(LIBLINTS) $(X11LINTS)
|
||||
$(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) $(X11LINTS)
|
||||
|
||||
libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
|
||||
$(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
|
||||
$(RM) libwine.so
|
||||
$(LN_S) $@ libwine.so
|
||||
|
||||
install_emu: install_lib
|
||||
[ -d $(bindir) ] || $(MKDIR) $(bindir)
|
||||
$(INSTALL_PROGRAM) wine $(bindir)/wine
|
||||
$(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
|
||||
|
||||
uninstall_emu: uninstall_lib
|
||||
$(RM) $(bindir)/wine $(bindir)/dosmod
|
||||
install_lib: install_$(LIB_TYPE)
|
||||
|
||||
install_lib: dummy
|
||||
install_nolib: dummy
|
||||
[ -d $(libdir) ] || $(MKDIR) $(libdir)
|
||||
if [ -f wine.sym ]; then $(INSTALL_DATA) wine.sym $(libdir)/wine.sym; fi
|
||||
if [ $(LIB_TARGET) ]; then \
|
||||
if [ $(LIB_TARGET) = libwine.so.1.0 ]; then \
|
||||
$(INSTALL_PROGRAM) $(LIB_TARGET) $(libdir); \
|
||||
$(LDCONFIG) || (cd $(libdir) ; $(RM) libwine.so ; $(LN_S) $(LIB_TARGET) libwine.so) ; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(LIB_TARGET) $(libdir); \
|
||||
fi \
|
||||
fi
|
||||
[ -d $(bindir) ] || $(MKDIR) $(bindir)
|
||||
$(INSTALL_PROGRAM) server/wineserver $(bindir)/wineserver
|
||||
$(INSTALL_PROGRAM) windows/x11drv/wineclipsrv $(bindir)/wineclipsrv
|
||||
$(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
|
||||
|
||||
uninstall_lib: dummy
|
||||
install_dll: install_nolib
|
||||
$(INSTALL_PROGRAM) $(LIB_TARGET) $(libdir)
|
||||
$(LDCONFIG) || (cd $(libdir) ; $(RM) libwine.so ; $(LN_S) $(LIB_TARGET) libwine.so)
|
||||
|
||||
install_static: install_nolib
|
||||
$(INSTALL_DATA) $(LIB_TARGET) $(libdir)
|
||||
|
||||
uninstall::
|
||||
cd $(libdir) && $(RM) $(LIB_TARGET) libwine.a libwine.so wine.sym
|
||||
$(RM) $(bindir)/wineserver $(bindir)/wineclipsrv
|
||||
cd $(bindir) && $(RM) wine wineserver wineclipsrv dosmod
|
||||
|
||||
$(X11OBJS) $(EMUOBJS) $(LIBOBJS): $(TOOLSUBDIRS) dummy
|
||||
@cd `dirname $@`; $(SUBMAKE)
|
||||
@cd `dirname $@` && $(MAKE) `basename $@`
|
||||
|
||||
$(BUILDSUBDIRS): dummy
|
||||
@cd $@; $(SUBMAKE)
|
||||
@cd $@ && $(MAKE)
|
||||
|
||||
$(LIBLINTS) $(X11LINTS) $(EMULINTS): dummy
|
||||
@echo $@ | sed 's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
|
||||
|
||||
|
||||
install_programs: dummy
|
||||
@cd programs; $(SUBMAKE) install
|
||||
@cd programs && $(MAKE) install
|
||||
|
||||
uninstall_programs: dummy
|
||||
@cd programs; $(SUBMAKE) uninstall
|
||||
@cd programs && $(MAKE) uninstall
|
||||
|
||||
install::
|
||||
for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
|
||||
@ -339,7 +325,7 @@ htmlpages:
|
||||
clean::
|
||||
for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
|
||||
for i in $(CLEANSUBDIRS); do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
|
||||
$(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
|
||||
$(RM) wine wine.sym libwine.so.1.0 TAGS .#*
|
||||
|
||||
distclean: clean
|
||||
$(RM) config.* Make.rules include/config.h documentation/wine.man documentation/wine.conf.man
|
||||
|
51
configure.in
51
configure.in
@ -14,8 +14,7 @@ dnl **** Command-line arguments ****
|
||||
|
||||
dnl Default values
|
||||
MAIN_TARGET=emu
|
||||
LIB_TARGET=libwine.a
|
||||
ALT_LINK="-Wl,--whole-archive -L\$(TOPOBJDIR) -lwine -Wl,--no-whole-archive"
|
||||
LIB_TYPE=dll # one of static, dll, nolib
|
||||
TRACE_MSGS=yes # the TRACE() macro
|
||||
DEBUG_MSGS=yes # the TRACE(), WARN(), and FIXME() macros.
|
||||
|
||||
@ -24,12 +23,12 @@ AC_ARG_ENABLE(emulator,
|
||||
[if test "$enableval" = "no"; then MAIN_TARGET="lib"; fi])
|
||||
|
||||
AC_ARG_ENABLE(dll,
|
||||
[ --enable-dll build the Wine library as a DLL],
|
||||
[if test "$enableval" = "no"; then : ; else LIB_TARGET="libwine.so.1.0"; fi])
|
||||
[ --disable-dll build static libraries instead of DLLs],
|
||||
[if test "$enableval" = "no"; then LIB_TYPE="static"; fi])
|
||||
|
||||
AC_ARG_ENABLE(lib,
|
||||
[ --disable-lib build the Wine without building libwine.a],
|
||||
[if test "$enableval" = "no"; then ALT_LINK="\$(LIBOBJS) \$(X11OBJS)"; LIB_TARGET=""; fi])
|
||||
[if test "$enableval" = "no"; then LIB_TYPE="nolib"; fi])
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --disable-debug compile out all debugging messages],
|
||||
@ -43,8 +42,6 @@ AC_ARG_WITH(reentrant-x,
|
||||
[ --without-reentrant-x compile for use with non-reentrant X libraries])
|
||||
|
||||
AC_SUBST(MAIN_TARGET)
|
||||
AC_SUBST(LIB_TARGET)
|
||||
AC_SUBST(ALT_LINK)
|
||||
AC_SUBST(OPTIONS)
|
||||
|
||||
if test "$DEBUG_MSGS" = "no"
|
||||
@ -379,10 +376,8 @@ fi
|
||||
|
||||
dnl **** Check for working dll ****
|
||||
|
||||
DLLFLAGS=""
|
||||
BUILDFLAGS=""
|
||||
LDSHARED=""
|
||||
if test "$LIB_TARGET" = "libwine.so.1.0"
|
||||
if test "$LIB_TYPE" = "dll"
|
||||
then
|
||||
AC_CACHE_CHECK("whether we can build a Linux dll",
|
||||
ac_cv_c_dll_linux,
|
||||
@ -393,9 +388,7 @@ then
|
||||
])
|
||||
if test "$ac_cv_c_dll_linux" = "yes"
|
||||
then
|
||||
BUILDFLAGS="-pic"
|
||||
DLLFLAGS="-fPIC"
|
||||
LDSHARED="\$(CC) -shared -Wl,-soname,libwine.so,-rpath,\$(libdir)"
|
||||
LDSHARED="\$(CC) -shared -Wl,-soname,\$(SONAME),-rpath,\$(libdir)"
|
||||
else
|
||||
AC_CACHE_CHECK("whether we can build a UnixWare dll",
|
||||
ac_cv_c_dll_unixware,
|
||||
@ -406,9 +399,7 @@ then
|
||||
])
|
||||
if test "$ac_cv_c_dll_unixware" = "yes"
|
||||
then
|
||||
BUILDFLAGS="-pic"
|
||||
DLLFLAGS="-fPIC"
|
||||
LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/libwine.so"
|
||||
LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/\$(SONAME)"
|
||||
else
|
||||
AC_CACHE_CHECK("whether we can build a NetBSD dll",
|
||||
ac_cv_c_dll_netbsd,
|
||||
@ -419,20 +410,42 @@ then
|
||||
])
|
||||
if test "$ac_cv_c_dll_netbsd" = "yes"
|
||||
then
|
||||
BUILDFLAGS="-pic"
|
||||
DLLFLAGS="-fPIC"
|
||||
LDSHARED="ld -Bshareable -Bforcearchive"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
|
||||
then
|
||||
LIB_TARGET="libwine.a"
|
||||
LIB_TYPE="static"
|
||||
fi
|
||||
fi
|
||||
|
||||
DLLFLAGS=""
|
||||
BUILDFLAGS=""
|
||||
LIBEXT="a"
|
||||
|
||||
if test "$LIB_TYPE" = "nolib"; then
|
||||
ALT_LINK="\$(LIBOBJS) \$(X11OBJS)"
|
||||
LIB_TARGET=""
|
||||
else
|
||||
ALT_LINK="-Wl,--whole-archive -L\$(TOPOBJDIR) -lwine -Wl,--no-whole-archive"
|
||||
if test "$LIB_TYPE" = "dll"; then
|
||||
LIB_TARGET="libwine.so"
|
||||
BUILDFLAGS="-pic"
|
||||
DLLFLAGS="-fPIC"
|
||||
LIBEXT="so"
|
||||
else
|
||||
LIB_TARGET="libwine.a"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(LIB_TARGET)
|
||||
AC_SUBST(LIB_TYPE)
|
||||
AC_SUBST(ALT_LINK)
|
||||
AC_SUBST(BUILDFLAGS)
|
||||
AC_SUBST(DLLFLAGS)
|
||||
AC_SUBST(LDSHARED)
|
||||
AC_SUBST(LIBEXT)
|
||||
|
||||
dnl **** Check for reentrant libc ****
|
||||
dnl
|
||||
|
@ -32,7 +32,7 @@ depend:: $(RC_SRCS:.rc=.h)
|
||||
$(RC_SRCS:.rc=.s): $(WRC)
|
||||
|
||||
$(WINESTUB):
|
||||
@cd ../library && $(SUBMAKE)
|
||||
@cd ../library && $(MAKE)
|
||||
|
||||
expand: expand.o $(WINESTUB)
|
||||
$(CC) -o expand expand.o $(LDOPTIONS) $(ALL_LIBS)
|
||||
|
Loading…
Reference in New Issue
Block a user