-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
44 lines (27 loc) · 944 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
33
34
35
36
37
38
39
40
41
42
43
44
CC = gcc
CFLAGS = -Wall -g -Iinclude -std=c11
all: main
#------------------------------------------------------------------------------------
#main - main.exe -> scaffold.o, iostr.a, opstr.a
main: lib/libscaffoldInterface.a
$(CC) $(CFLAGS) -o bin/main -L./lib/ -lscaffoldInterface
#------------------------------------------------------------------------------------
#scaffoldInterface - libscaffoldInterface.a -> scaffoldInterface.o ->
# scaffoldInterface.c, scaffoldInterface.h
scaffoldInterface: lib/libscaffoldInterface.a
lib/libscaffoldInterface.a: scaffoldInterface.o
ar cr lib/libscaffoldInterface.a scaffoldInterface.o
scaffoldInterface.o: src/scaffoldInterface.c
$(CC) $(CFLAGS) -c src/scaffoldInterface.c
#------------------------------------------------------------------------------------
#Utility Funtions
clean:
rm *.o
rm lib/*.a
rm bin/main
run:
./bin/main
cclear:
clear
clear
r: cclear clean main run