build static library

parent 95e35ec7
......@@ -25,6 +25,8 @@ endif
libriterate: $(OBJECTS)
# make shared library
$(LD) $(CFLAGS) -shared -Wl,-soname,librinterpolate.so,--export-dynamic -fvisibility=hidden -o librinterpolate.so $(LDFLAGS) $(LIBS) $(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
......@@ -37,8 +39,10 @@ clean:
install:
install -d $(DESTDIR)$(PREFIX)/lib
install -m 644 librinterpolate.so $(DESTDIR)$(PREFIX)/lib
install -m 644 librinterpolate.a $(DESTDIR)$(PREFIX)/lib
install -d $(DESTDIR)$(PREFIX)/include
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
......@@ -44,10 +44,12 @@
(unlikely(MORE_THAN(_x,_b)) ? _b : _x); \
})
#ifndef IS_ZERO
#define IS_ZERO(A) (fabs((A))<TINY)
#endif
#ifndef FEQUAL
#define FEQUAL(A,B) (IS_ZERO((A)-(B)))
#endif
#ifdef RINTERPOLATE_DEBUG
extern int rinterpolate_debug;
......
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