-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (23 loc) · 864 Bytes
/
Makefile
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
# Copyright Joan Montas
# All rights reserved.
# License under GNU General Public License v3.0
CC = gcc
CFLAGS = --std=c99 -Wextra -Wpedantic -Wformat -Wshadow #-Wconversion
PROGRAM_NAME = SFEC_USECASE
BUILD_DIR = build
BIN_DIR = bin
all: $(BUILD_DIR) $(BIN_DIR) $(PROGRAM_NAME)
$(BUILD_DIR):
mkdir -p $(BUILD_DIR)
$(BIN_DIR):
mkdir -p $(BIN_DIR)
$(PROGRAM_NAME): $(BUILD_DIR)/SFEC.o $(BUILD_DIR)/radiationGuard.o $(BUILD_DIR)/main.o
$(CC) $(CFLAGS) -o $(BIN_DIR)/$(PROGRAM_NAME) $(BUILD_DIR)/SFEC.o $(BUILD_DIR)/radiationGuard.o $(BUILD_DIR)/main.o
$(BUILD_DIR)/main.o: src/main.c
$(CC) $(CFLAGS) -c $< -o $@
$(BUILD_DIR)/SFEC.o: src/SFEC.c
$(CC) $(CFLAGS) -c $< -o $@
$(BUILD_DIR)/radiationGuard.o: src/radiationGuard.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -rf $(BUILD_DIR) $(BIN_DIR)/$(PROGRAM_NAME) ./data/corrected.txt ./data/input.txt.SFEC