Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions Makefile-alt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
CC ?= gcc
CFLAGS ?= -std=c99 -Wall -Wextra -pedantic -Os
CURSESCFLAGS ?=
CURSESLIBS ?= -lncursesw
DESTDIR ?= /usr/local
MANDIR ?= $(DESTDIR)/man/man1

CFLAGS := $(CFLAGS) $(CURSESCFLAGS)
LIBS := -lutil $(CURSESLIBS)
FEATURES := -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED

all: mtm

mtm: vtparser.c mtm.c config.h
$(CC) $(CFLAGS) $(FEATURES) -o $@ vtparser.c mtm.c $(LIBS)
strip -s mtm

config.h: config.def.h
cp -i config.def.h config.h

install: mtm
mkdir -p $(DESTDIR)/bin
mkdir -p $(MANDIR)
cp mtm $(DESTDIR)/bin
cp mtm.1 $(MANDIR)

install-terminfo: mtm.ti
tic -s -x mtm.ti

clean:
rm -f *.o mtm