blob: de20dff9d8ee45d7cdb9dbb6eb2966749971ed53 (
plain)
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
|
# common
CC := gcc
CFLAGS := -Wpedantic -s -O2 -Wall -I.
LDFLAGS :=
# only for the vm
SDL2_CONFIG := sdl2-config
LIBS := `$(SDL2_CONFIG) --libs` -lSDL2_mixer
all: tr8as tr8vm
tr8vm: tr8vm.c vm.o vm.h
$(CC) -std=c99 $(CFLAGS) `$(SDL2_CONFIG) --cflags` $< vm.o `$(SDL2_CONFIG) --libs` $(LIBS) -o $@
tr8as: tr8as.c
$(CC) -std=c89 $(CFLAGS) -DDO_MAIN $< -o $@
vm.o: vm.c vm.h
$(CC) -c -std=c89 $(CFLAGS) $< -o $@
example: example.tr8 tr8vm
./tr8vm example.tr8
example.tr8: example.asm tr8as
./tr8as example.asm example.tr8
clean:
rm -f tr8as tr8vm example.tr8
.PHONY: clean all example
|