|
@@ -1,20 +1,15 @@
|
|
# Common makefile rules for tests
|
|
# Common makefile rules for tests
|
|
#
|
|
#
|
|
-# Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
|
|
+# Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
|
|
#
|
|
#
|
|
-# This program is free software; you can redistribute it and/or modify it under
|
|
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
|
|
-# the terms of the GNU Library General Public License as published by the Free
|
|
+
|
|
-# Software Foundation; either version 2 of the License, or (at your option) any
|
|
+ifeq ($(TESTS),)
|
|
-# later version.
|
|
+TESTS := $(patsubst %.c,%,$(wildcard *.c))
|
|
-#
|
|
+endif
|
|
-# This program is distributed in the hope that it will be useful, but WITHOUT
|
|
+ifneq ($(TESTS_DISABLED),)
|
|
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
+TESTS := $(filter-out $(TESTS_DISABLED),$(TESTS))
|
|
-# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
|
|
+endif
|
|
-# details.
|
|
|
|
-#
|
|
|
|
-# You should have received a copy of the GNU Library General Public License
|
|
|
|
-# along with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
|
|
|
include ../Rules.mak
|
|
include ../Rules.mak
|
|
|
|
|
|
@@ -57,6 +52,7 @@ define uclibc_glibc_diff_test
|
|
exec diff -u "$$uclibc_out" "$$glibc_out"
|
|
exec diff -u "$$uclibc_out" "$$glibc_out"
|
|
endef
|
|
endef
|
|
define exec_test
|
|
define exec_test
|
|
|
|
+ $(showtest)
|
|
$(Q)\
|
|
$(Q)\
|
|
$(WRAPPER) $(WRAPPER_$(patsubst %_glibc,%,$@)) \
|
|
$(WRAPPER) $(WRAPPER_$(patsubst %_glibc,%,$@)) \
|
|
./$@ $(OPTS) $(OPTS_$(patsubst %_glibc,%,$@)) &> "$@.out" ; \
|
|
./$@ $(OPTS) $(OPTS_$(patsubst %_glibc,%,$@)) &> "$@.out" ; \
|
|
@@ -72,7 +68,7 @@ define exec_test
|
|
endef
|
|
endef
|
|
|
|
|
|
$(U_TARGETS):
|
|
$(U_TARGETS):
|
|
- $(showtest)
|
|
+ $(showlink)
|
|
$(Q)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -c $@.c -o $@.o
|
|
$(Q)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -c $@.c -o $@.o
|
|
$(Q)$(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$@)
|
|
$(Q)$(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$@)
|
|
ifeq ($(COMPILE_ONLY),)
|
|
ifeq ($(COMPILE_ONLY),)
|
|
@@ -81,7 +77,7 @@ ifeq ($(COMPILE_ONLY),)
|
|
endif
|
|
endif
|
|
|
|
|
|
$(G_TARGETS):
|
|
$(G_TARGETS):
|
|
- $(showtest)
|
|
+ $(showlink)
|
|
$(Q)$(HOSTCC) $(HOST_CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(patsubst %_glibc,%,$@)) -c $(patsubst %_glibc,%,$@).c -o $@.o
|
|
$(Q)$(HOSTCC) $(HOST_CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(patsubst %_glibc,%,$@)) -c $(patsubst %_glibc,%,$@).c -o $@.o
|
|
$(Q)$(HOSTCC) $(HOST_LDFLAGS) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$(patsubst %_glibc,%,$@))
|
|
$(Q)$(HOSTCC) $(HOST_LDFLAGS) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$(patsubst %_glibc,%,$@))
|
|
ifeq ($(COMPILE_ONLY),)
|
|
ifeq ($(COMPILE_ONLY),)
|