diff options
| author | Mattias Andrée <maandree@kth.se> | 2021-04-01 23:39:01 +0200 | 
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2021-04-01 23:39:01 +0200 | 
| commit | c120520578692ee2448ba057e470ac580fc01de8 (patch) | |
| tree | e1a89a37ff4abe4578edd50c5eff6411cdad3a9b /Makefile | |
| download | libterminput-c120520578692ee2448ba057e470ac580fc01de8.tar.gz libterminput-c120520578692ee2448ba057e470ac580fc01de8.tar.bz2 libterminput-c120520578692ee2448ba057e470ac580fc01de8.tar.xz | |
First commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
| -rw-r--r-- | Makefile | 44 | 
1 files changed, 44 insertions, 0 deletions
| diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b6913f6 --- /dev/null +++ b/Makefile @@ -0,0 +1,44 @@ +.POSIX: + +CONFIGFILE = config.mk +include $(CONFIGFILE) + + +OBJ =\ +	interactive-test.o\ +	libterminput.o + +HDR =\ +	libterminput.h + + +all: libterminput.a interactive-test +$(OBJ): $(@:.o=.c) $(HDR) + +.c.o: +	$(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) + +.o.a: +	$(AR) rc $@ $< +	$(AR) -s $@ + +interactive-test: interactive-test.o libterminput.a +	$(CC) -o $@ interactive-test.o libterminput.a $(LDFLAGS) + +install: libterminput.a +	mkdir -p -- "$(DESTDIR)$(PREFIX)/lib" +	mkdir -p -- "$(DESTDIR)$(PREFIX)/include" +	cp -- libterminput.a "$(DESTDIR)$(PREFIX)/lib/" +	cp -- libterminput.h "$(DESTDIR)$(PREFIX)/include/" + +uninstall: +	rm -- "$(DESTDIR)$(PREFIX)/lib/libterminput.a" +	rm -- "$(DESTDIR)$(PREFIX)/include/libterminput.h" + +clean: +	-rm -f -- *.o *.a interactive-test + +.SUFFIXES: +.SUFFIXES: .a .o .c + +.PHONY: all install uninstall clean | 
