-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (36 loc) · 691 Bytes
/
Copy pathMakefile
File metadata and controls
52 lines (36 loc) · 691 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
NAME = chip8
SRC = src/main.c \
src/disas.c \
src/op_codes.c \
src/chip8_engine.c \
src/utils.c \
src/instructions_executors.c \
src/display_buffer.c \
src/clock.c \
src/display.c
CC = gcc
OBJ = $(SRC:.c=.o)
CFLAGS = -Wall -Wextra
CPPFLAGS = -I./inc
LIBFLAGS = -lSDL2
RM = rm -f
all: $(NAME)
$(NAME): $(OBJ)
$(CC) -o $(NAME) $(OBJ) $(LIBFLAGS)
build: all
clean:
@$(RM) $(OBJ)
fclean: clean
@$(RM) $(NAME)
re: fclean all
debug: CPPFLAGS += -g3
debug: re
wasm:
emcc $(SRC) \
-I./inc/ \
-O3 \
-s WASM=1 \
-s USE_SDL=2 \
--embed-file Pong.ch8 \
-o index.js
.PHONY: all clean fclean re build debug