no-more-secrets-rust/Makefile
Brian Barto da514019de Initial update with code from libnms
modified:   Makefile
	new file:   src/libnms.c
	new file:   src/libnms.h
	modified:   src/main.c
	modified:   src/sneakers.c
2017-01-08 17:22:03 -05:00

49 lines
876 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
EXES = nms sneakers
all: $(EXES)
nms: $(OBJ)/libnms.o $(OBJ)/main.o | $(BIN)
$(CC) $(CFLAGS) -o $(BIN)/$@ $^
sneakers: $(OBJ)/libnms.o $(OBJ)/sneakers.o | $(BIN)
$(CC) $(CFLAGS) -o $(BIN)/$@ $^
$(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 $(EXES) $(DESTDIR)$(bindir)
uninstall:
for exe in $(EXES); do rm $(DESTDIR)$(bindir)/$$exe; done