-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (23 loc) · 791 Bytes
/
Makefile
File metadata and controls
30 lines (23 loc) · 791 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
CC = gcc
DEBUG = -D DEBUG=0
CFLAGS = -g -std=c99 -Wall -Werror -fsanitize=address,undefined $(DEBUG)
mysh: mysh.o job.o arraylist.o builtins.o
$(CC) $(CFLAGS) -o $@ $^
testJobMaking: testJobMaking.o job.o arraylist.o builtins.o
$(CC) $(CFLAGS) -o $@ $^
./testJobMaking
batchmodetest: clean mysh sumFunction squareFunction
./mysh test1.sh
sumFunction: sumFunction.o
$(CC) $(CFLAGS) -o $@ $^
squareFunction: squareFunction.o
$(CC) $(CFLAGS) -o $@ $^
sumFunction.o: sumFunction.c
$(CC) $(CFLAGS) -c $^
squareFunction.o: squareFunction.c
$(CC) $(CFLAGS) -c $^
*.o: *.h
removeTXTFiles:
rm -f -r directory.txt sumOutput.txt testFolder/testResults.txt testFolder/testResults2.txt
clean: removeTXTFiles
rm -f -r *.gch *.o *.dSYM mysh testJobMaking sumFunction squareFunction