From 2bb738d1f4b8a8c6041bfcc266601cffedc386d5 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Sat, 25 Apr 2020 21:27:46 +0930 Subject: added ncurses minesweeper, changed readme and makefile --- makefile | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index cf00d22..609f4b2 100644 --- a/makefile +++ b/makefile @@ -1,25 +1,9 @@ -TARGET = csweeper -LIBS = -CC = gcc -CFLAGS = -g -Wall -Wextra -std=c99 - -.PHONY: default all clean - -default: $(TARGET) -all: default - -OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c)) -HEADERS = $(wildcard *.h) - -%.o: %.c $(HEADERS) - $(CC) $(CFLAGS) -c $< -o $@ - -.PRECIOUS: $(TARGET) $(OBJECTS) - -$(TARGET): $(OBJECTS) - $(CC) $(OBJECTS) -Wall $(LIBS) -o $@ +all: csweeper ncsweeper +csweeper: csweeper.c + cc -g -Wall -Wextra -std=c99 -o csweeper csweeper.c +ncsweeper: ncsweeper.c + cc -g -Wall -Wextra -std=c99 -lncurses -o ncsweeper ncsweeper.c clean: - -rm -f *.o - -rm -f $(TARGET) - + @rm -f csweeper ncsweeper + @rm -f *.o -- cgit v1.2.3