-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (28 loc) · 1.12 KB
/
Copy pathMakefile
File metadata and controls
34 lines (28 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# ──────────────────────────────────────────────────────────────
# Makefile — Student Database Management System
# Course: CSE 124 - Data Structure Lab
# Institution: Daffodil International University
# ──────────────────────────────────────────────────────────────
CC = gcc
CFLAGS = -Wall -Wextra -pedantic -std=c99 -Iinclude
SOURCES = src/main.c src/student.c src/database.c src/utils.c ui/menu.c
TARGET = student_db
# ── Default target ──
all: $(TARGET)
$(TARGET): $(SOURCES)
$(CC) $(CFLAGS) -o $(TARGET) $(SOURCES)
@echo.
@echo [BUILD] student_db compiled successfully.
@echo [RUN] Execute with: ./student_db
# ── Clean build artifacts ──
clean:
ifeq ($(OS),Windows_NT)
del /Q $(TARGET).exe 2>nul
else
rm -f $(TARGET)
endif
@echo [CLEAN] Build artifacts removed.
# ── Run the program ──
run: $(TARGET)
./$(TARGET)
.PHONY: all clean run