From e4a1686d5ca41ad02672c6530588f94c34a1c678 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 2 Sep 2021 22:17:14 +0200 Subject: First commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 -- cgit v1.2.3-70-g09d2