Skip to content

Commit 6adf066

Browse files
committed
Folded in Owen's makefiles for RS232 devices. Thanks Owen!
1 parent 58cefa7 commit 6adf066

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

Makefile.zx-rs232 renamed to Makefile.zx-rs232-IF1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
TARGET_EXEC ?= plato.bin
1+
TARGET_EXEC ?= platoIF1.bin
22

3-
BUILD_DIR ?= ./build
3+
BUILD_DIR ?= ./build-IF1
44
SRC_DIRS ?= ./src
55

66
CC=zcc
@@ -10,7 +10,8 @@ OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
1010
DEPS := $(OBJS:.o=.d)
1111

1212
CFLAGS=+zx -D__SPECTRUM__ -D__RS232__
13-
LDFLAGS=-lndos -lm -lrs232plus -create-app
13+
LDFLAGS=-lndos -lm -lrs232if1 -create-app #normal tap - Product TAP
14+
#LDFLAGS=-lndos -lm -lrs232if1 -create-app -subtype=turbo -audio #TURBO WAV only - DEV compiler
1415

1516
INC_DIRS := $(shell find $(SRC_DIRS) -type d)
1617
INC_FLAGS := $(addprefix -I,$(INC_DIRS))

Makefile.zx-rs232-PLUS

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
TARGET_EXEC ?= platoPLUS.bin
2+
3+
BUILD_DIR ?= ./build-PLUS
4+
SRC_DIRS ?= ./src
5+
6+
CC=zcc
7+
8+
SRCS := $(shell find $(SRC_DIRS) -name *.cpp -or -name *.c -or -name *.s)
9+
OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
10+
DEPS := $(OBJS:.o=.d)
11+
12+
CFLAGS=+zx -D__SPECTRUM__ -D__RS232__
13+
LDFLAGS=-lndos -lm -lrs232plus -create-app #normal tap - Product TAP
14+
#LDFLAGS=-lndos -lm -lrs232plus -create-app -subtype=turbo -audio #TURBO WAV only - DEV compiler
15+
16+
17+
INC_DIRS := $(shell find $(SRC_DIRS) -type d)
18+
INC_FLAGS := $(addprefix -I,$(INC_DIRS))
19+
20+
$(BUILD_DIR)/$(TARGET_EXEC): $(OBJS)
21+
$(CC) +zx $(OBJS) -o $@ $(LDFLAGS)
22+
23+
# c source
24+
$(BUILD_DIR)/%.c.o: %.c
25+
$(MKDIR_P) $(dir $@)
26+
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
27+
28+
.PHONY: clean
29+
30+
clean:
31+
$(RM) -r $(BUILD_DIR)
32+
33+
-include $(DEPS)
34+
35+
MKDIR_P ?= mkdir -p

0 commit comments

Comments
 (0)