no-more-secrets-rust/Makefile
Brian Barto e42155973a ncurses implementation
modified:   Makefile
	new file:   src/nms-ncurses.c
2017-01-17 22:00:24 -05:00

51 lines
959 B
Makefile

# Installation directories following GNU conventions
prefix ?= /usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
sbindir = $(exec_prefix)/sbin
datarootdir = $(prefix)/share
datadir = $(datarootdir)
includedir = $(prefix)/include
mandir = $(datarootdir)/man
BIN=bin
OBJ=obj
SRC=src
CC ?= gcc
CFLAGS ?= -Wextra -Wall
.PHONY: all install uninstall clean
nms: $(OBJ)/nms.o $(OBJ)/main.o | $(BIN)
$(CC) $(CFLAGS) -o $(BIN)/$@ $^
sneakers: $(OBJ)/nms.o $(OBJ)/sneakers.o | $(BIN)
$(CC) $(CFLAGS) -o $(BIN)/$@ $^
all: nms sneakers
nms-ncurses: $(OBJ)/nms-ncurses.o $(OBJ)/main.o | $(BIN)
$(CC) $(CFLAGS) -o $(BIN)/$@ $^ -lncurses
$(OBJ)/%.o: $(SRC)/%.c | $(OBJ)
$(CC) $(CFLAGS) -o $@ -c $<
$(BIN):
mkdir $(BIN)
$(OBJ):
mkdir $(OBJ)
clean:
rm -rf $(BIN)
rm -rf $(OBJ)
install:
install -d $(DESTDIR)$(bindir)
cd $(BIN) && install * $(DESTDIR)$(bindir)
uninstall:
rm -f $(DESTDIR)$(bindir)/nms;
rm -f $(DESTDIR)$(bindir)/sneakers;