updates to remove malloc.h references

parent 7fa4038e
......@@ -10,16 +10,14 @@ LIBS ?= -lm -lc
LDFLAGS ?=
C_SRC := $(wildcard *.c)
OBJECTS := $(C_SRC:.c=.o)
#OBJECTS := rinterpolate.o rinterpolate-debug.o
LIBRINTERPOLATE_ARCHFLAGS ?= -march=native -mtune=native
CFLAGS := -fPIC -O2 -std=gnu99 -g $(LIBRINTERPOLATE_ARCHFLAGS) -Wformat-signedness -Wformat -Wall -Wstrict-prototypes -ffast-math -D__RINTERPOLATE__ -D__RINTERPOLATE_BUILD_BUILD_FLAGS__ $(COPTFLAGS)
CFLAGS := -O3 $(COPTFLAGS) $(LIBRINTERPOLATE_ARCHFLAGS)
REQCFLAGS := -fPIC -g -std=gnu99 -D__RINTERPOLATE__ -Wall -Wstrict-prototypes -Wno-nonnull-compare -Wformat-signedness -Wformat -D__RINTERPOLATE_BUILD_BUILD_FLAGS__
ifeq ($(PREFIX),)
PREFIX := /usr/local
endif
#%.o:%.c
#$(OBJECTS): %.o:%.c
# $(CC) -c $(CFLAGS) $(INCDIRS) $(DEPFLAGS) -MF $*.d $< -o $@
%.o : %.c
$(CC) -c $(CFLAGS) $(REQCFLAGS) $(INCDIRS) $< -o $@
.PHONY: clean install
......@@ -29,7 +27,7 @@ libriterate: $(OBJECTS)
# make static library
ar rcs librinterpolate.a $(OBJECTS)
# 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:
......@@ -45,5 +43,4 @@ install:
install -m 644 rinterpolate.h $(DESTDIR)$(PREFIX)/include
install -m 644 rinterpolate_prototypes.h $(DESTDIR)$(PREFIX)/include
install -m 644 rinterpolate_compiler.h $(DESTDIR)$(PREFIX)/include
# /sbin/ldconfig
......@@ -14,7 +14,6 @@
#include <math.h>
#include <float.h>
#include <stdio.h>
#include <malloc.h>
#include "rinterpolate_compiler.h"
/************************************************************
......
#include "rinterpolate.h"
#include "rinterpolate_internal.h"
#ifdef RINTERPOLATE_USE_REALLOC
#include <malloc.h>
#endif
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