From 1909a882df9e40c079b7fbcdfba3d1742c52a0fb Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Sat, 25 Apr 2015 12:38:16 +0200 Subject: Provide and use compiler-dependent standard headers. This branch provides implementations of the following standard headers: 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). --- runtime/Makefile | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'runtime/Makefile') 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) -- cgit