summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile30
1 files changed, 7 insertions, 23 deletions
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