Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
Krasimir committed Nov 25, 2024
1 parent 6387a79 commit 63e2ce0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@

# Compiler and flags
CC = gcc
CFLAGS = -Wall -Wextra -O2

# Targets
ASSIGNMENT = assignment
TEST = test

# Source files
ASSIGNMENT_SRC = assignment.c
TEST_SRC = test.c

# Build assignment executable
$(ASSIGNMENT): $(ASSIGNMENT_SRC)
$(CC) $(CFLAGS) -o $(ASSIGNMENT) $(ASSIGNMENT_SRC)

# Build and run test
test: $(ASSIGNMENT) $(TEST_SRC)
$(CC) $(CFLAGS) -o $(TEST) $(TEST_SRC)
./$(ASSIGNMENT) 5 10
./$(TEST)

# Clean up
clean:
rm -f $(ASSIGNMENT) $(TEST) matrix.txt
rm -f $(ASSIGNMENT) $(TEST) matrix.txt

0 comments on commit 63e2ce0

Please sign in to comment.