-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
79 lines (54 loc) · 1.22 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
NAME = space_shooter
ASM = rgbasm
LD = rgblink
FIX = rgbfix
FIXFLAGS = -jsv -k 01 -l 0x33 -m 0x01 -p 0 -r 00 -t "`echo "$(NAME)" | tr a-z A-Z | tr "_" " "`"
ASMFLAGS =
LDFLAGS = -n $(NAME).sym -l $(NAME).link
FXFLAGS =
FX = rgbgfx
SRCS = \
src/main.asm \
src/mem_layout.asm \
src/assets.asm \
src/text.asm
IMGS = \
assets/asteroids.png \
assets/spaceship.png \
assets/logo.png \
assets/boss.png
COMPRESSED_IMGS = \
assets/font.png \
assets/bigj.png \
assets/biga.png \
assets/bigm.png \
assets/epitech.png \
assets/background.png \
assets/laser.png
COMPRESSEDIMGSFX = $(COMPRESSED_IMGS:%.png=%.cfx)
IMGSFX = $(IMGS:%.png=%.fx)
OBJS = $(SRCS:%.asm=%.o)
all: tools/compressor $(NAME).gbc
tools/compressor:
$(MAKE) -C tools compressor
run: re
wine "$(BGB_PATH)" ./$(NAME).gbc
runw: re
"$(BGB_PATH)" ./$(NAME).gbc
%.fx : %.png
$(FX) $(FXFLAGS) -o $@ $<
%.cfx : %.png
$(FX) $(FXFLAGS) -o $@ $<
tools/compressor $@
%.o : %.asm
$(ASM) -o $@ $(ASMFLAGS) $<
$(NAME).gbc: $(COMPRESSEDIMGSFX) $(IMGSFX) $(OBJS)
$(LD) $(LDFLAGS) -o $@ $(OBJS)
$(FIX) $(FIXFLAGS) $@
clean:
$(MAKE) -C tools clean
$(RM) $(OBJS) $(IMGSFX) $(COMPRESSEDIMGSFX)
fclean: clean
$(MAKE) -C tools fclean
$(RM) $(NAME).gbc
re: fclean all