-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (27 loc) · 743 Bytes
/
Makefile
File metadata and controls
39 lines (27 loc) · 743 Bytes
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
35
36
37
38
APPS = ./apps
BIN = ./bin
INCLUDE = ./include
OBJ = ./obj
SRC = ./src
FLAGS = -Wall -lm
$(OBJ)/%.o: $(SRC)/%.c $(INCLUDE)/%.h #Template for compile object files
gcc -c $< -I $(INCLUDE) -o $@ $(FLAGS)
$(BIN)/%: $(APPS)/%.c #Template for compile main source files
gcc $< $(OBJ)/*.o -I $(INCLUDE) -o $@ $(FLAGS)
all: clean compile_libs compile_apps
compile_libs: \
$(OBJ)/StringList.o \
$(OBJ)/StringStack.o \
$(OBJ)/iocli.o \
$(OBJ)/MathExpressions.o \
$(OBJ)/MathVariables.o \
$(OBJ)/commands.o
compile_apps: \
$(BIN)/MathCalculator
depurate:
gcc -g $(APPS)/MathCalculator.c $(SRC)/*.c -I $(INCLUDE) -o $(BIN)/Depurate_MathCalculator $(FLAGS)
run:
./bin/MathCalculator
clean:
rm -rf $(OBJ)/* $(BIN)/*
clear