-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
33 lines (29 loc) · 824 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
##########################################################################################
#
# IFJ - interpret of IFJ15 language
#
# Makefile
# build binary file from source files
#
# author: Miroslav Karásek (xkaras31)
# created: 2015-11-05
# modified: 2015-11-17
#
##########################################################################################
# compiler options
CC=gcc
CFLAGS=-O2 -std=c11 -pedantic -Wall -Wextra -g
DEPS = scanner.h instlist.h pointerstack.h interpret.h string.h ial.h parser.h
OBJ = parser.o interpret.o scanner.o instlist.o pointerstack.o string.o ial.o
# modules compilation
%.o: %.c $(DEPS)
$(CC) $(CFLAGS) -c $< -o $@
# link
ifj15: main.c $(OBJ)
$(CC) $(CFLAGS) $? -o $@
# test
test: test.c $(OBJ)
$(CC) $(CFLAGS) $? -o $@
# clean
clean:
rm *.o *.exe ifj15