/
snek-qemu.defs
56 lines (42 loc) · 1.26 KB
/
snek-qemu.defs
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
#
# Copyright © 2019 Keith Packard <keithp@keithp.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
SNEK_LOCAL_SRC = \
snek-math.c \
snek-io.c \
snek-input.c \
snek-qemu.c
SNEK_LOCAL_INC = \
snek-qemu.h
SNEK_LOCAL_BUILTINS = \
snek-qemu.builtin \
snek-math.builtin \
snek-input.builtin
SNEK_LOCAL_VPATH = $(SNEK_QEMU)
PICOLIBC_PRINTF_CFLAGS = -DPICOLIBC_FLOAT_PRINTF_SCANF
PICOLIBC_CFLAGS= \
-specs=picolibc.specs \
$(PICOLIBC_PRINTF_CFLAGS)
OPT?=-Os
CFLAGS=$(ARCH_CFLAGS) --oslib=semihost \
-std=gnu99 $(OPT) -g \
-I. -I$(SNEK_QEMU) -I$(SNEK_ROOT) $(PICOLIBC_CFLAGS) $(SNEK_CFLAGS)
LDFLAGS=$(SNEK_LDFLAGS) $(CFLAGS) -n
LIBS=-lm
PROG=$(PROGNAME)-$(SNEK_VERSION).elf
MAP=$(PROGNAME)-$(SNEK_VERSION).map
CC=$(ARCH)-gcc
OBJCOPY=$(ARCH)-objcopy
distclean: clean
clean::
rm -f *.o $(PROGNAME)*.elf $(PROGNAME)*.map