-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (31 loc) · 847 Bytes
/
Makefile
File metadata and controls
45 lines (31 loc) · 847 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
SOURCES8=$(wildcard src/*.s)
OBJECTS8=$(SOURCES8:.s=.o)
PATH_DEST=build/
ifeq ($(CC65_HOME),)
CC = cc65
AS = ca65
LD = ld65
AR = ar65
else
CC = $(CC65_HOME)/bin/cc65
AS = $(CC65_HOME)/bin/ca65
LD = $(CC65_HOME)/bin/ld65
AR = $(CC65_HOME)/bin/ar65
endif
VERSION=$(cat VERSION)
all: $(SOURCES8) $(OBJECTS8) build
$(OBJECTS8): $(SOURCES8)
@ca65 -ttelestrat $(@:.o=.s) -o $@ --include-dir src/include
@ar65 r ch376.lib $@
build:
@mkdir build/lib8/ -p
@mkdir build/usr/include/ -p
@mkdir build/usr/arch/include/ -p
@mkdir build/usr/src/ch376lib/$(VERSION)/arch/ -p
cp ch376.lib build/lib8/
cp src/include/ch376.h build/usr/include
cp src/include/ch376.inc build/usr/arch/include
cp src/*.s build/usr/src/ch376lib/$(VERSION)/arch/
clean:
rm src/*.o
rm ch376.lib