aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 6df226cff06271e7d19c8ae7d96c67778c7d45b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CC = gcc
OUT = build
PLATFORM = unix

DUCKY_OBJ = src/interp.o src/compile.o src/vm.o src/emitc.o src/common.o

CFLAGS = -lm -Og -g -I src/ -I target/$(PLATFORM)

all: $(OUT)/$(PLATFORM).bin

$(OUT)/$(PLATFORM).bin: $(DUCKY_OBJ) target/$(PLATFORM)/main.o Makefile
	mkdir -p $(OUT)
	$(CC) $(DUCKY_OBJ) target/$(PLATFORM)/main.o $(CFLAGS) -o $(OUT)/$(PLATFORM).bin

install: $(OUT)/$(PLATFORM).bin
	install $(OUT)/$(PLATFORM).bin /bin/ducky

clean:
	rm -f $(OUT)/$(PLATFORM).bin
	rm -f target/$(PLATFORM)/main.o
	rm -f $(DUCKY_OBJ)