forked from AlexAltea/orbital
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (38 loc) · 1.32 KB
/
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
45
CC ?= gcc
AR ?= ar
CC ?= gcc
CXX ?= g++
CFLAGS = -Wall -Wextra -Og -g
CXXFLAGS = -Wall -Wextra -Og -g -std=c++11
ARC = $(wildcard *.a)
OBJ = $(wildcard *.o)
BIN = $(patsubst %.cpp, %.elf, $(wildcard *.cpp)) \
$(patsubst %.c, %.elf, $(wildcard *.c))
.PHONY: all clean
all: $(BIN)
clean:
rm -f $(ARC)
rm -f $(OBJ)
rm -f $(BIN)
# Tests
test_gcn_disasm.elf: test_gcn_disasm.c
$(CC) $(CFLAGS) -o $@ $< \
../orbital-qemu/hw/ps4/liverpool/gca/gcn_parser.c \
../orbital-qemu/hw/ps4/liverpool/gca/gcn_disasm.c \
-I../orbital-qemu/hw/ps4/liverpool/gca
test_gcn_analyzer.elf: test_gcn_analyzer.c
$(CC) $(CFLAGS) -o $@ $< \
../orbital-qemu/hw/ps4/liverpool/gca/gcn_parser.c \
../orbital-qemu/hw/ps4/liverpool/gca/gcn_analyzer.c \
../orbital-qemu/hw/ps4/liverpool/gca/gcn_resource.c \
-I../orbital-qemu/hw/ps4/liverpool/gca
test_gcn_translator.elf: test_gcn_translator.cpp libspirv.a
$(CC) $(CFLAGS) -c \
../orbital-qemu/hw/ps4/liverpool/gca/gcn_parser.c \
../orbital-qemu/hw/ps4/liverpool/gca/gcn_analyzer.c \
../orbital-qemu/hw/ps4/liverpool/gca/gcn_resource.c \
-I../orbital-qemu/hw/ps4/liverpool/gca
$(CXX) $(CXXFLAGS) -o $@ $< gcn_parser.o gcn_analyzer.o gcn_resource.o \
../orbital-qemu/hw/ps4/liverpool/gca/gcn_translator.cpp \
-I../orbital-qemu/hw/ps4/liverpool/gca \
-lSPIRV