mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
6164ce2d82
This enables it to be auto-updated by make_makefiles.
61 lines
1.5 KiB
Makefile
61 lines
1.5 KiB
Makefile
# Global rules for building dll unit tests -*-Makefile-*-
|
|
#
|
|
# Each individual makefile should define the following variables:
|
|
# TESTDLL : the dll to test
|
|
# C_SRCS : list of C test programs
|
|
# EXTRALIBS : extra libraries to link in (optional)
|
|
# EXTRADEFS : extra symbol definitions, like -DWINELIB (optional)
|
|
#
|
|
# plus all variables required by the global Make.rules.in
|
|
#
|
|
|
|
DLLFLAGS = @DLLFLAGS@
|
|
DEFS = -DWINE_STRICT_PROTOTYPES $(EXTRADEFS)
|
|
|
|
MODULE = $(TESTDLL:%.dll=%)_test.exe
|
|
TESTRESULTS = $(C_SRCS:.c=.ok)
|
|
TESTPROGRAM = $(MODULE)$(DLLEXT)
|
|
RUNTESTFLAGS = -q -P wine -M $(TESTDLL) -T $(TOPOBJDIR) -p $(TESTPROGRAM)
|
|
|
|
ALL_LIBS = $(IMPORTS:%=-l%) $(EXTRALIBS) $(LDFLAGS) $(LIBS)
|
|
EXTRA_OBJS = testlist.o
|
|
|
|
CROSSTEST = $(TESTDLL:%.dll=%)_crosstest.exe
|
|
MAKEDEPFLAGS = -xo -xcross.o
|
|
|
|
@MAKE_RULES@
|
|
|
|
all: $(TESTPROGRAM)
|
|
|
|
$(MODULE) $(MODULE).so: $(OBJS) Makefile.in
|
|
$(WINEGCC) $(APPMODE) $(OBJS) -o $@ $(LIBPORT) $(ALL_LIBS)
|
|
|
|
.PHONY: check test testclean crosstest
|
|
|
|
# Rules for building test list
|
|
|
|
testlist.c: Makefile.in $(MAKECTESTS)
|
|
$(MAKECTESTS) -o $@ $(C_SRCS)
|
|
|
|
testlist.o: testlist.c $(TOPSRCDIR)/include/wine/test.h
|
|
|
|
# Rules for testing
|
|
|
|
check test:: $(TESTRESULTS)
|
|
|
|
$(TESTRESULTS): $(MODULE)$(DLLEXT) ../$(TESTDLL)$(DLLEXT)
|
|
|
|
# Rules for cross-compiling tests
|
|
|
|
crosstest:: @CROSSTEST@
|
|
|
|
$(CROSSTEST): $(CROSSOBJS) Makefile.in
|
|
$(CROSSWINEGCC) $(CROSSOBJS) -o $@ $(ALL_LIBS)
|
|
|
|
# Rules for cleaning
|
|
|
|
testclean::
|
|
$(RM) $(TESTRESULTS)
|
|
|
|
clean::
|
|
$(RM) testlist.c $(MODULE) $(TESTRESULTS) $(CROSSTEST)
|