Add makefile

This commit is contained in:
Aidan Haas 2022-11-07 18:37:58 -05:00 committed by GitHub
parent e41a7d84c2
commit 66cd9d46d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

27
Makefile Normal file
View File

@ -0,0 +1,27 @@
# Macros
CC = gcc
CFLAGS = -ansi -Wall -g -O0 -Wshadow -Wwrite-strings \
-fstack-protector-all
LDLIBS = -lncurses
all: typing_test debugger
# Create executables
typing_test: typing_test.o string_helpers.o
$(CC) -o typing_test typing_test.o string_helpers.o $(LDLIBS)
debugger: debugger.o utilities.o
$(CC) -o debugger debugger.o utilities.o
typing_test.o: typing_test.c
$(CC) $(CFLAGS) -c typing_test.c $(LDLIBS)
debugger.o: debugger.c utilities.h
$(CC) $(CFLAGS) -c debugger.c
utilities.o: utilities.c
$(CC) $(CFLAGS) -c utilities.c
clean:
@echo "Cleaning system"
@rm -f *.o