Commit fabd3120 authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Move the main module rules to the global Make.rules file.

parent f94c8669
......@@ -25,7 +25,7 @@ IDL_GEN_HEADERS = $(IDL_H_SRCS:.idl=.h) $(IDL_C_SRCS:.idl=.h) $(IDL_I_SRCS:.idl=
$(IDL_P_SRCS:.idl=.h) $(IDL_S_SRCS:.idl=.h)
CLEAN_FILES = *.o *.a *.so *.mo *.res *.fake *.ok *.tab.[ch] *.yy.c
CLEAN_TARGETS = $(IMPORTLIB:%=lib%.@IMPLIBEXT@) $(IDL_GEN_C_SRCS) $(IDL_GEN_HEADERS) \
CLEAN_TARGETS = $(MODULE) $(IMPORTLIB:%=lib%.@IMPLIBEXT@) $(IDL_GEN_C_SRCS) $(IDL_GEN_HEADERS) \
$(IDL_TLB_SRCS:.idl=.tlb) $(IDL_P_SRCS:.idl=_p.c dlldata.c) \
$(PO_SRCS:.rc=.res rsrc.pot) $(MC_SRCS:.mc=.res msg.pot) $(XTEMPLATE_SRCS:.x=.h)
......@@ -109,6 +109,11 @@ CROSSOBJS = $(OBJS:.o=.cross.o)
dlldata.c: $(WIDL) Makefile.in
$(WIDL) $(IDLFLAGS) --dlldata-only -o $@ $(IDL_P_SRCS)
# Rules for main module
$(MODULE) $(MODULE:%=%.so) $(MODULE:%=%.fake): $(MAINSPEC) $(OBJS) Makefile.in
$(WINEGCC) $(APPMODE) $(MODULEFLAGS) $(OBJS) -o $@ $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(DELAYIMPORTS:%=-Wb,-d%) -lwine $(LIBPORT) $(EXTRALIBS) $(LDFLAGS) $(LIBS)
# Rules for static libraries
all: $(STATICLIB)
......
......@@ -9,9 +9,9 @@
#
DLLFLAGS = @DLLFLAGS@
MODULE = $(TESTDLL:%.dll=%)_test.exe
TESTMODULE = $(TESTDLL:%.dll=%)_test.exe
TESTRESULTS = $(C_SRCS:.c=.ok)
TESTPROGRAM = $(MODULE)$(DLLEXT)
TESTPROGRAM = $(TESTMODULE)$(DLLEXT)
WINETEST_EXE = $(TESTDLL:%.dll=%)_test-stripped.exe$(DLLEXT)
WINETEST_RES = $(top_builddir)/programs/winetest/$(TESTDLL:%.dll=%)_test.res
RUNTESTFLAGS = -q -P wine -M $(TESTDLL) -T $(top_builddir) -p $(TESTPROGRAM)
......@@ -26,14 +26,14 @@ MAKEDEPFLAGS = -xo -xcross.o
all: $(TESTPROGRAM) $(WINETEST_RES)
$(MODULE) $(MODULE).so: $(OBJS) Makefile.in
$(TESTMODULE) $(TESTMODULE).so: $(OBJS) Makefile.in
$(WINEGCC) $(APPMODE) $(OBJS) -o $@ $(ALL_LIBS)
$(WINETEST_EXE): $(OBJS) Makefile.in
$(WINEGCC) -s -Wb,-F,$(MODULE) $(APPMODE) $(OBJS) -o $@ $(ALL_LIBS)
$(WINEGCC) -s -Wb,-F,$(TESTMODULE) $(APPMODE) $(OBJS) -o $@ $(ALL_LIBS)
$(WINETEST_RES): $(WINETEST_EXE)
echo "$(MODULE) TESTRES \"$(WINETEST_EXE)\"" | $(WRC) $(RCFLAGS) -o $@
echo "$(TESTMODULE) TESTRES \"$(WINETEST_EXE)\"" | $(WRC) $(RCFLAGS) -o $@
.PHONY: check test testclean crosstest
......@@ -48,7 +48,7 @@ testlist.o testlist.cross.o: testlist.c $(top_srcdir)/include/wine/test.h
check test: $(TESTRESULTS)
$(TESTRESULTS): $(MODULE)$(DLLEXT) ../$(TESTDLL)$(DLLEXT)
$(TESTRESULTS): $(TESTMODULE)$(DLLEXT) ../$(TESTDLL)$(DLLEXT)
# Rules for cross-compiling tests
......@@ -63,4 +63,4 @@ testclean::
$(RM) $(TESTRESULTS)
clean::
$(RM) testlist.c $(MODULE) $(TESTRESULTS) $(CROSSTEST)
$(RM) testlist.c $(TESTMODULE) $(TESTRESULTS) $(CROSSTEST)
......@@ -8,14 +8,10 @@
#
DLLFLAGS = @DLLFLAGS@
BASEMODULE = $(MODULE:%.dll=%)
MAINSPEC = $(BASEMODULE).spec
ALL_LIBS = $(LIBPORT) $(EXTRALIBS) $(LDFLAGS) $(LIBS)
MAINSPEC = $(MODULE:%.dll=%).spec
IDL_TLB_RES = $(IDL_TLB_SRCS:.idl=_t.res)
@MAKE_RULES@
MODULEFLAGS = -shared $(srcdir)/$(MAINSPEC) $(EXTRADLLFLAGS)
all: $(MODULE)$(DLLEXT) $(MODULE)$(FAKEEXT)
$(MODULE) $(MODULE).so $(MODULE).fake: $(MAINSPEC) $(OBJS) Makefile.in
$(WINEGCC) -shared $(srcdir)/$(MAINSPEC) $(OBJS) $(EXTRADLLFLAGS) -o $@ $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(DELAYIMPORTS:%=-Wb,-d%) $(ALL_LIBS)
@MAKE_RULES@
......@@ -10,14 +10,7 @@
#
DLLFLAGS = @DLLFLAGS@
ALL_LIBS = $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(EXTRALIBS) -lwine $(LIBPORT) $(LDFLAGS) $(LIBS)
@MAKE_RULES@
all: $(MODULE)$(DLLEXT) $(MODULE)$(FAKEEXT)
$(MODULE) $(MODULE).so $(MODULE).fake: $(OBJS) Makefile.in
$(WINEGCC) $(APPMODE) $(OBJS) -o $@ $(ALL_LIBS) $(DELAYIMPORTS:%=-Wb,-d%)
clean::
$(RM) $(MODULE)
@MAKE_RULES@
......@@ -930,7 +930,6 @@ static void build(struct options* opts)
add_library(opts, lib_dirs, files, "kernel32");
add_library(opts, lib_dirs, files, "ntdll");
}
if (opts->shared && !opts->nostdlib) add_library(opts, lib_dirs, files, "wine");
if (!opts->shared && opts->use_msvcrt && opts->target_platform == PLATFORM_CYGWIN)
add_library(opts, lib_dirs, files, "msvcrt");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment