diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2015-04-25 12:38:16 +0200 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2015-04-25 12:38:16 +0200 |
commit | 1909a882df9e40c079b7fbcdfba3d1742c52a0fb (patch) | |
tree | 3649a07f7fb56bd9f1d05e7a65b3a30fc807c75d /runtime/Makefile | |
parent | 3c6f5343e0e64b273658b6b3508a8dd6c29b8cef (diff) | |
download | compcert-1909a882df9e40c079b7fbcdfba3d1742c52a0fb.tar.gz compcert-1909a882df9e40c079b7fbcdfba3d1742c52a0fb.zip |
Provide and use compiler-dependent standard headers.
This branch provides implementations of the following standard headers:
<float.h> <stdarg.h> <stdbool.h> <stddef.h> <varargs.h>
These are the headers that are provided by GCC and Clang, as opposed
to being provided by Glibc and similar C standard libraries.
Configuration flag "-no-standard-headers" deactivates the installation
and use of these headers.
Lightly tested so far (IA32 Linux).
Diffstat (limited to 'runtime/Makefile')
-rw-r--r-- | runtime/Makefile | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/runtime/Makefile b/runtime/Makefile index 9a872427..2fdaa4ec 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -1,15 +1,16 @@ include ../Makefile.config CFLAGS=-O1 -g -Wall -INCLUDES= OBJS=i64_dtos.o i64_dtou.o i64_sar.o i64_sdiv.o i64_shl.o \ i64_shr.o i64_smod.o i64_stod.o i64_stof.o \ i64_udivmod.o i64_udiv.o i64_umod.o i64_utod.o i64_utof.o \ vararg.o LIB=libcompcert.a +INCLUDES=include/float.h include/stdarg.h include/stdbool.h \ + include/stddef.h include/varargs.h ifeq ($(strip $(HAS_RUNTIME_LIB)),true) -all: $(LIB) $(INCLUDES) +all: $(LIB) else all: endif @@ -28,11 +29,19 @@ clean:: rm -f *.o $(LIB) ifeq ($(strip $(HAS_RUNTIME_LIB)),true) -install: +install:: install -d $(LIBDIR) - install -c $(LIB) $(INCLUDES) $(LIBDIR) + install -m 0644 $(LIB) $(LIBDIR) else -install: +install:: +endif + +ifeq ($(strip $(HAS_STANDARD_HEADERS)),true) +install:: + install -d $(LIBDIR)/include + install -m 0644 $(INCLUDES) $(LIBDIR)/include +else +install:: endif test/test_int64: test/test_int64.c $(LIB) |