summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-09-02 22:17:14 +0200
committerMattias Andrée <maandree@kth.se>2021-09-02 22:28:08 +0200
commite4a1686d5ca41ad02672c6530588f94c34a1c678 (patch)
treecd143c5dcbc5b8182ce7df521bf48f4de2617628 /Makefile
downloadlibnumtext-e4a1686d5ca41ad02672c6530588f94c34a1c678.tar.gz
libnumtext-e4a1686d5ca41ad02672c6530588f94c34a1c678.tar.bz2
libnumtext-e4a1686d5ca41ad02672c6530588f94c34a1c678.tar.xz
First commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile45
1 files changed, 45 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..796d0cf
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,45 @@
+.POSIX:
+
+CONFIGFILE = config.mk
+include $(CONFIGFILE)
+
+OBJ =\
+ libnumtext_num2text.o\
+ libnumtext_remove_separators.o\
+ swedish.o
+
+HDR =\
+ libnumtext.h\
+ common.h
+
+all: libnumtext.a
+$(OBJ): $(HDR)
+$(OBJ:.o=.lo): $(HDR)
+
+.c.o:
+ $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)
+
+.c.lo:
+ $(CC) -fPIC -c -o $@ $< $(CFLAGS) $(CPPFLAGS)
+
+libnumtext.a: $(OBJ)
+ @rm -f -- $@
+ $(AR) rc $@ $(OBJ)
+
+install: libnumtext.a
+ mkdir -p -- "$(DESTDIR)$(PREFIX)/lib"
+ mkdir -p -- "$(DESTDIR)$(PREFIX)/include"
+ cp -- libnumtext.a "$(DESTDIR)$(PREFIX)/lib/"
+ cp -- libnumtext.h "$(DESTDIR)$(PREFIX)/include/"
+
+uninstall:
+ -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libnumtext.a"
+ -rm -f -- "$(DESTDIR)$(PREFIX)/include/libnumtext.h"
+
+clean:
+ -rm -f -- *.o *.a *.lo *.su *.so *.so.* *.gch *.gcov *.gcno *.gcda
+
+.SUFFIXES:
+.SUFFIXES: .lo .o .c
+
+.PHONY: all install uninstall clean