updates to remove malloc.h references

parent 7fa4038e
...@@ -10,16 +10,14 @@ LIBS ?= -lm -lc ...@@ -10,16 +10,14 @@ LIBS ?= -lm -lc
LDFLAGS ?= LDFLAGS ?=
C_SRC := $(wildcard *.c) C_SRC := $(wildcard *.c)
OBJECTS := $(C_SRC:.c=.o) OBJECTS := $(C_SRC:.c=.o)
#OBJECTS := rinterpolate.o rinterpolate-debug.o CFLAGS := -O3 $(COPTFLAGS) $(LIBRINTERPOLATE_ARCHFLAGS)
LIBRINTERPOLATE_ARCHFLAGS ?= -march=native -mtune=native REQCFLAGS := -fPIC -g -std=gnu99 -D__RINTERPOLATE__ -Wall -Wstrict-prototypes -Wno-nonnull-compare -Wformat-signedness -Wformat -D__RINTERPOLATE_BUILD_BUILD_FLAGS__
CFLAGS := -fPIC -O2 -std=gnu99 -g $(LIBRINTERPOLATE_ARCHFLAGS) -Wformat-signedness -Wformat -Wall -Wstrict-prototypes -ffast-math -D__RINTERPOLATE__ -D__RINTERPOLATE_BUILD_BUILD_FLAGS__ $(COPTFLAGS)
ifeq ($(PREFIX),) ifeq ($(PREFIX),)
PREFIX := /usr/local PREFIX := /usr/local
endif endif
#%.o:%.c %.o : %.c
#$(OBJECTS): %.o:%.c $(CC) -c $(CFLAGS) $(REQCFLAGS) $(INCDIRS) $< -o $@
# $(CC) -c $(CFLAGS) $(INCDIRS) $(DEPFLAGS) -MF $*.d $< -o $@
.PHONY: clean install .PHONY: clean install
...@@ -29,7 +27,7 @@ libriterate: $(OBJECTS) ...@@ -29,7 +27,7 @@ libriterate: $(OBJECTS)
# make static library # make static library
ar rcs librinterpolate.a $(OBJECTS) ar rcs librinterpolate.a $(OBJECTS)
# make test executable # make test executable
$(CC) $(CFLAGS) -D__TEST_RINTERPOLATE__ test_rinterpolate.c -o test_rinterpolate -lc -lm -ldl $(OBJECTS) -lm $(CC) $(CFLAGS) $(REQCFLAGS) -D__TEST_RINTERPOLATE__ test_rinterpolate.c -o test_rinterpolate -lc -lm -ldl $(OBJECTS) -lm
# clean objects and shared libraries # clean objects and shared libraries
clean: clean:
...@@ -45,5 +43,4 @@ install: ...@@ -45,5 +43,4 @@ install:
install -m 644 rinterpolate.h $(DESTDIR)$(PREFIX)/include install -m 644 rinterpolate.h $(DESTDIR)$(PREFIX)/include
install -m 644 rinterpolate_prototypes.h $(DESTDIR)$(PREFIX)/include install -m 644 rinterpolate_prototypes.h $(DESTDIR)$(PREFIX)/include
install -m 644 rinterpolate_compiler.h $(DESTDIR)$(PREFIX)/include install -m 644 rinterpolate_compiler.h $(DESTDIR)$(PREFIX)/include
# /sbin/ldconfig
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <math.h> #include <math.h>
#include <float.h> #include <float.h>
#include <stdio.h> #include <stdio.h>
#include <malloc.h>
#include "rinterpolate_compiler.h" #include "rinterpolate_compiler.h"
/************************************************************ /************************************************************
......
#include "rinterpolate.h" #include "rinterpolate.h"
#include "rinterpolate_internal.h" #include "rinterpolate_internal.h"
#ifdef RINTERPOLATE_USE_REALLOC
#include <malloc.h>
#endif
void rinterpolate_alloc_hypertable(struct rinterpolate_table_t * RESTRICT const table) void rinterpolate_alloc_hypertable(struct rinterpolate_table_t * RESTRICT const table)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment