-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (22 loc) · 809 Bytes
/
Makefile
File metadata and controls
32 lines (22 loc) · 809 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
CC = gcc
CFLAGS = -g -Wall -Wextra -Wno-unused -Werror
all: tinysh
TESTS = $(wildcard test*.sh)
TEST_BASES = $(subst .sh,,$(TESTS))
TINYSH_SOURCES = \
main.c \
token_stream.c \
command_stream.c \
command_utility.c \
concurrent_commands.c
TINYSH_OBJECTS = $(subst .c,.o,$(TINYSH_SOURCES))
tinysh: $(TINYSH_OBJECTS)
$(CC) $(CFLAGS) -o $@ $(TINYSH_OBJECTS)
execute-command.o main.o print-command.o read-command.o: command.h command_utility.h token_stream.h command_stream.h concurrent_commands.h
execute-command.o print-command.o read-command.o: command.h command_utility.h token_stream.h command_stream.h concurrent_commands.h
check: $(TEST_BASES)
$(TEST_BASES): tinysh
./$@.sh
clean:
rm -fr *.o *~ *.bak *.tar.gz core *.core *.tmp tinysh $(DISTDIR)
.PHONY: all check $(TEST_BASES) clean