mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2024-12-28 20:43:41 +01:00
c21453060d
* Previously, behavior differed if the same value of `ARCH` was defined within `Make.inc` or defined on the command line. Don't do that. * Provide saner defaults for `ARCH` and `MARCH`, and more importantly, allow for the proper overriding of both. * Split `AArch64` code further away from the other `arm` code.
33 lines
1.3 KiB
Makefile
33 lines
1.3 KiB
Makefile
OPENLIBM_HOME=$(abspath ..)
|
|
include ../Make.inc
|
|
|
|
# Set rpath of tests to builddir for loading shared library
|
|
OPENLIBM_LIB = -L.. -lopenlibm
|
|
ifeq ($(OS),Linux)
|
|
OPENLIBM_LIB += -Wl,-rpath=$(OPENLIBM_HOME)
|
|
endif
|
|
|
|
all: test-double test-float # test-double-system test-float-system
|
|
|
|
bench: bench-syslibm bench-openlibm
|
|
|
|
test-double: test-double.c libm-test.c libm-test-ulps.h
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_arch) $(LDFLAGS) $(LDFLAGS_arch) $@.c -D__BSD_VISIBLE -I ../include -I../src $(OPENLIBM_LIB) -o $@
|
|
|
|
test-float: test-float.c libm-test.c libm-test-ulps.h
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_arch) $(LDFLAGS) $(LDFLAGS_arch) $@.c -D__BSD_VISIBLE -I ../include -I../src $(OPENLIBM_LIB) -o $@
|
|
|
|
test-double-system: test-double.c libm-test.c libm-test-ulps.h
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_arch) $(LDFLAGS) $(LDFLAGS_arch) $< -DSYS_MATH_H -lm -o $@
|
|
|
|
test-float-system: test-float.c libm-test.c libm-test-ulps.h
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_arch) $(LDFLAGS) $(LDFLAGS_arch) $< -DSYS_MATH_H -lm -o $@
|
|
|
|
bench-openlibm: libm-bench.cpp
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_arch) $(LDFLAGS) $(LDFLAGS_arch) $< $(OPENLIBM_LIB) -o $@
|
|
|
|
bench-syslibm: libm-bench.cpp
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_arch) $(LDFLAGS) $(LDFLAGS_arch) $< -lm -o $@
|
|
|
|
clean:
|
|
rm -fr test-double test-float test-double-system test-float-system bench-openlibm bench-syslibm *.dSYM
|