-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (23 loc) · 769 Bytes
/
Copy pathMakefile
File metadata and controls
30 lines (23 loc) · 769 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
TARGET =./bin/mips-sim
CC=gcc
#CFLAGS =-g -Wno-parentheses -std=gnu99# -D DEBUG_LEVEL=ERROR_LVL -Wno-packed-bitfield-compat
CFLAGS =-ggdb -Wall -Werror -Wno-parentheses -std=gnu99 -D DEBUG_LEVEL=ERROR_LVL -Wno-packed-bitfield-compat
# CFLAGS =-E -dD
SRCDIR = src/
TESTDIR = tests/
SOURCES =$(wildcard $(SRCDIR)*.c)
OBJECTS =$(SOURCES:.c=.o)
LFLAGS =
.PHONY: clean all
all: $(TARGET)
$(TARGET): $(OBJECTS) Makefile
install -D /dev/null $(TARGET)
$(CC) $(CFLAGS) $(OBJECTS) -o $(TARGET) $(LFLAGS)
%.o: %.c Makefile
$(CC) -o $@ $(CFLAGS) -c $<
test: $(wildcard $(TESTDIR)*.S) Makefile
make -C $(TESTDIR)
perf: all perf.gdb ../KUDOS/kudos/kudos-mips32
gdb -x perf.gdb --args bin/mips-sim -p ../KUDOS/kudos/kudos-mips32
clean:
rm -f $(OBJECTS) $(TARGET)