aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-03-05 20:59:13 +0100
committerMattias Andrée <maandree@kth.se>2021-03-05 21:02:20 +0100
commit7edd0ced5c8e45161cb655a36f05f2a90283bb9e (patch)
tree943f82c02c73936aab637d1b40e0513c1591834c /Makefile
parentAdd -DDEBUG to debug.mk (diff)
downloadlibgamma-7edd0ced5c8e45161cb655a36f05f2a90283bb9e.tar.gz
libgamma-7edd0ced5c8e45161cb655a36f05f2a90283bb9e.tar.bz2
libgamma-7edd0ced5c8e45161cb655a36f05f2a90283bb9e.tar.xz
Join test source files into test.c and update
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 17f7774..41a9607 100644
--- a/Makefile
+++ b/Makefile
@@ -151,7 +151,7 @@ HDR =\
$(HDR_METHODS)
-all: libgamma.a libgamma.$(LIBEXT)
+all: libgamma.a libgamma.$(LIBEXT) test
$(OBJ): $(@:.o=.c) $(HDR)
$(LOBJ): $(@:.lo=.c) $(HDR)
@@ -177,6 +177,12 @@ libgamma.$(LIBEXT): $(LOBJ)
.c.lo:
$(CC) -fPIC -c -o $@ $< $(CFLAGS) $(CFLAGS_METHODS) $(CPPFLAGS) $(CPPFLAGS_METHODS)
+test.o: test.c libgamma.h
+ $(CC) -c -o $@ test.c $(CFLAGS) $(CPPFLAGS)
+
+test: test.o
+ $(CC) -o $@ test.o libgamma.a $(LDFLAGS_METHODS) $(LDFLAGS)
+
install: libgamma.a libgamma.$(LIBEXT)
mkdir -p -- "$(DESTDIR)$(PREFIX)/lib/"
mkdir -p -- "$(DESTDIR)$(PREFIX)/include/"
@@ -194,7 +200,7 @@ uninstall:
-rm -f -- "$(DESTDIR)$(PREFIX)/include/libgamma.h"
clean:
- -rm -f -- *.o *.lo *.su *.a *.$(LIBEXT)
+ -rm -f -- *.o *.lo *.su *.a *.$(LIBEXT) test config.h
.SUFFIXES:
.SUFFIXES: .lo .o .c