no-more-secrets-rust/Makefile

34 lines
538 B
Makefile
Raw Normal View History

BIN=bin
OBJ=obj
SRC=src
CC = gcc
CFLAGS = -Wextra -Wall
LDLIBS = -lncurses
2016-04-27 22:25:18 -07:00
NCURSES_H = /usr/include/ncurses.h
all: nms sneakers
nms: $(OBJ)/nms.o $(OBJ)/main.o | $(BIN)
$(CC) $(CFLAGS) -o $(BIN)/$@ $^ $(LDLIBS)
sneakers: $(OBJ)/nms.o $(OBJ)/sneakers.o | $(BIN)
$(CC) $(CFLAGS) -o $(BIN)/$@ $^ $(LDLIBS)
2016-04-27 22:25:18 -07:00
$(OBJ)/%.o: $(SRC)/%.c | $(OBJ) $(NCURSES_H)
$(CC) $(CFLAGS) -o $@ -c $<
$(BIN):
mkdir $(BIN)
$(OBJ):
mkdir $(OBJ)
$(NCURSES_H):
sudo apt-get update
sudo apt-get install ncurses-dev
clean:
rm -rf $(BIN)
rm -rf $(OBJ)