makefiles: Move the import library rules to the global Make.rules file.
This commit is contained in:
parent
e318b4a59c
commit
752b0e02ea
|
@ -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 = $(IDL_GEN_C_SRCS) $(IDL_GEN_HEADERS) \
|
||||
CLEAN_TARGETS = $(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)
|
||||
|
||||
|
@ -123,6 +123,19 @@ $(STATICLIB:.a=.cross.a): $(CROSSOBJS) Makefile.in
|
|||
$(CROSSAR) $(ARFLAGS) $@ $(CROSSOBJS)
|
||||
$(CROSSRANLIB) $@
|
||||
|
||||
# Rules for import libraries
|
||||
|
||||
$(IMPORTLIB:%=lib%.def.a): $(IMPLIB_SRCS:.c=.o)
|
||||
$(RM) $@
|
||||
$(AR) $(ARFLAGS) $@ $(IMPLIB_SRCS:.c=.o)
|
||||
$(RANLIB) $@
|
||||
|
||||
$(IMPORTLIB:%=lib%.a): $(MAINSPEC) $(IMPLIB_SRCS:.c=.o)
|
||||
$(WINEBUILD) $(TARGETFLAGS) -w --implib -o $@ --export $(srcdir)/$(MAINSPEC) $(IMPLIB_SRCS:.c=.o)
|
||||
|
||||
$(IMPORTLIB:%=lib%.cross.a): $(MAINSPEC) $(IMPLIB_SRCS:.c=.cross.o)
|
||||
$(WINEBUILD) $(CROSSTARGET:%=-b %) -w --implib -o $@ --export $(srcdir)/$(MAINSPEC) $(IMPLIB_SRCS:.c=.cross.o)
|
||||
|
||||
# Rules for dependencies
|
||||
|
||||
DEPEND_SRCS = $(C_SRCS) $(OBJC_SRCS) $(RC_SRCS) $(MC_SRCS) \
|
||||
|
|
|
@ -432,8 +432,8 @@ $ac_dir/uninstall::
|
|||
wine_fn_append_rule \
|
||||
"__builddeps__: $ac_file.$IMPLIBEXT $ac_file.$STATIC_IMPLIBEXT
|
||||
$ac_file.$IMPLIBEXT $ac_file.$STATIC_IMPLIBEXT $ac_file.cross.a: $ac_deps
|
||||
$ac_file.def: $ac_dir/$ac_name.spec $ac_dir/Makefile
|
||||
@cd $ac_dir && \$(MAKE) lib$ac_implib.def
|
||||
$ac_file.def: $ac_dir/$ac_name.spec $ac_dir/Makefile \$(WINEBUILD)
|
||||
\$(WINEBUILD) \$(TARGETFLAGS)$ac_implibflags -w --def -o \$[@] --export \$(srcdir)/$ac_dir/$ac_name.spec
|
||||
$ac_file.$STATIC_IMPLIBEXT: $ac_dir/Makefile dummy
|
||||
@cd $ac_dir && \$(MAKE) lib$ac_implib.$STATIC_IMPLIBEXT
|
||||
.PHONY: $ac_dir/install-dev $ac_dir/uninstall
|
||||
|
|
|
@ -16294,8 +16294,8 @@ fi
|
|||
wine_fn_append_rule \
|
||||
"__builddeps__: $ac_file.$IMPLIBEXT $ac_file.$STATIC_IMPLIBEXT
|
||||
$ac_file.$IMPLIBEXT $ac_file.$STATIC_IMPLIBEXT $ac_file.cross.a: $ac_deps
|
||||
$ac_file.def: $ac_dir/$ac_name.spec $ac_dir/Makefile
|
||||
@cd $ac_dir && \$(MAKE) lib$ac_implib.def
|
||||
$ac_file.def: $ac_dir/$ac_name.spec $ac_dir/Makefile \$(WINEBUILD)
|
||||
\$(WINEBUILD) \$(TARGETFLAGS)$ac_implibflags -w --def -o \$@ --export \$(srcdir)/$ac_dir/$ac_name.spec
|
||||
$ac_file.$STATIC_IMPLIBEXT: $ac_dir/Makefile dummy
|
||||
@cd $ac_dir && \$(MAKE) lib$ac_implib.$STATIC_IMPLIBEXT
|
||||
.PHONY: $ac_dir/install-dev $ac_dir/uninstall
|
||||
|
|
|
@ -12,10 +12,6 @@ BASEMODULE = $(MODULE:%.dll=%)
|
|||
MAINSPEC = $(BASEMODULE).spec
|
||||
ALL_LIBS = $(LIBPORT) $(EXTRALIBS) $(LDFLAGS) $(LIBS)
|
||||
IDL_TLB_RES = $(IDL_TLB_SRCS:.idl=_t.res)
|
||||
IMPLIB_OBJS = $(IMPLIB_SRCS:.c=.o)
|
||||
IMPLIBFLAGS = $(TARGETFLAGS) $(EXTRAIMPLIBFLAGS)
|
||||
IMPORTLIBFILE = $(IMPORTLIB:%=lib%.@IMPLIBEXT@)
|
||||
STATICIMPLIB = $(IMPORTLIBFILE:.def=.def.a)
|
||||
|
||||
@MAKE_RULES@
|
||||
|
||||
|
@ -24,30 +20,6 @@ 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)
|
||||
|
||||
# Rules for import libraries
|
||||
|
||||
IMPLIB_CROSSOBJS = $(IMPLIB_OBJS:.o=.cross.o)
|
||||
|
||||
.PHONY: $(IMPLIB_SRCS:%=__static_implib__%)
|
||||
|
||||
all: $(IMPORTLIBFILE) $(IMPLIB_SRCS:%=__static_implib__%) @CROSSTEST_DISABLE@ $(IMPORTLIB:%=lib%.cross.a)
|
||||
|
||||
$(IMPLIB_SRCS:%=__static_implib__%): $(STATICIMPLIB)
|
||||
|
||||
$(IMPORTLIB:%=lib%.def): $(MAINSPEC)
|
||||
$(WINEBUILD) $(IMPLIBFLAGS) -w --def -o $@ --export $(srcdir)/$(MAINSPEC)
|
||||
|
||||
$(IMPORTLIB:%=lib%.def.a): $(IMPLIB_OBJS)
|
||||
$(RM) $@
|
||||
$(AR) $(ARFLAGS) $@ $(IMPLIB_OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
$(IMPORTLIB:%=lib%.a): $(MAINSPEC) $(IMPLIB_OBJS)
|
||||
$(WINEBUILD) $(IMPLIBFLAGS) -w --implib -o $@ --export $(srcdir)/$(MAINSPEC) $(IMPLIB_OBJS)
|
||||
|
||||
$(IMPORTLIB:%=lib%.cross.a): $(MAINSPEC) $(IMPLIB_CROSSOBJS)
|
||||
$(WINEBUILD) $(IMPLIBFLAGS) $(CROSSTARGET:%=-b %) -w --implib -o $@ --export $(srcdir)/$(MAINSPEC) $(IMPLIB_CROSSOBJS)
|
||||
|
||||
# Rules for auto documentation
|
||||
|
||||
manpages:: $(C_SRCS) dummy
|
||||
|
@ -62,9 +34,4 @@ sgmlpages:: $(C_SRCS) dummy
|
|||
xmlpages:: $(C_SRCS) dummy
|
||||
$(C2MAN) -o $(top_builddir)/documentation/api-guide-xml -R$(top_builddir) -C$(srcdir) $(INCLUDES) -Tx $(MAINSPEC:%=-w %) $(C_SRCS)
|
||||
|
||||
# Misc. rules
|
||||
|
||||
clean::
|
||||
$(RM) $(IMPORTLIBFILE)
|
||||
|
||||
# End of global dll rules
|
||||
|
|
|
@ -2,7 +2,6 @@ MODULE = krnl386.exe16
|
|||
IMPORTLIB = kernel
|
||||
IMPORTS = winecrt0 kernel32 ntdll
|
||||
DELAYIMPORTS = ddraw dsound user32
|
||||
EXTRAIMPLIBFLAGS = -m16
|
||||
EXTRADLLFLAGS = -m16 -nodefaultlibs -Wb,--dll-name,kernel
|
||||
EXTRARCFLAGS = -m16
|
||||
|
||||
|
|
Loading…
Reference in New Issue