123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- include ../Rules.mak
- U_TARGETS := $(TESTS)
- G_TARGETS := $(patsubst %,%_glibc,$(U_TARGETS))
- U_TARGETS += $(U_TESTS)
- G_TARGETS += $(G_TESTS)
- TARGETS =
- ifeq ($(GLIBC_ONLY),)
- TARGETS += $(U_TARGETS)
- endif
- ifeq ($(UCLIBC_ONLY),)
- TARGETS += $(G_TARGETS)
- endif
- all: $(TARGETS)
- $(TARGETS): Makefile $(TESTDIR)Rules.mak $(TESTDIR)Test.mak
- $(U_TARGETS): $(patsubst %,%.c,$(U_TARGETS))
- $(G_TARGETS): $(patsubst %_glibc,%.c,$(G_TARGETS))
- $(U_TARGETS):
- -@ echo "----------------------------"
- -@ echo "Compiling $@ vs uClibc: "
- -@ echo " "
- $(CC) $(CFLAGS) -c $@.c -o $@.o
- $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $$WRAPPER_$@ ./$@ $$OPTS_$@ ; \
- ret=$$? ; \
- test -z "$$RET_$@" && export RET_$@=0 ; \
- test $$ret -eq $$RET_$@
- -@ echo " "
- $(G_TARGETS):
- -@ echo "----------------------------"
- -@ echo "Compiling $@ vs glibc: "
- -@ echo " "
- $(HOSTCC) $(GLIBC_CFLAGS) -c $(patsubst %_glibc,%,$@).c -o $@.o
- $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
- $(STRIPTOOL) -x -R .note -R .comment $@
- $$WRAPPER_$(patsubst %_glibc,%,$@) ./$@ $$OPTS_$(patsubst %_glibc,%,$@) ; \
- ret=$$? ; \
- test -z "$$RET_$(patsubst %_glibc,%,$@)" && export RET_$(patsubst %_glibc,%,$@)=0 ; \
- test $$ret -eq $$RET_$(patsubst %_glibc,%,$@)
- -@ echo " "
- clean:
- $(RM) *.[oa] *~ core $(TARGETS)
|