forked from FujiNetWIFI/fujinet-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.pc8801
47 lines (33 loc) · 908 Bytes
/
Makefile.pc8801
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
TARGET_EXEC ?= autorun.d88
BUILD_DIR ?= ./build
SRC_DIRS ?= ./src
ADDL_DIR1 :=
ADDL_DIR2 :=
ADDL_LIB1 :=
ADDL_LIB2 :=
CC=zcc
AS=zcc
SRCS := $(shell find $(SRC_DIRS) -name *.cpp -or -name *.c -or -name *_pc8801.asm)
OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
DEPS := $(OBJS:.o=.d)
CFLAGS=+pc88 -subtype=disk -DBUILD_PC8801
LDFLAGS=+pc88 -subtype=disk -o$(TARGET_EXEC) -create-app
ASFLAGS=+pc88 -subtype=disk
INC_DIRS := $(shell find $(SRC_DIRS) -type d)
INC_FLAGS := $(addprefix -I,$(INC_DIRS))
$(BUILD_DIR)/$(TARGET_EXEC): $(OBJS)
$(CC) $(LDFLAGS) $(OBJS)
#cp autorun.ddp ../fujinet-platformio/data/BUILD_PC8801/
# c source
$(BUILD_DIR)/%.c.o: %.c
$(MKDIR_P) $(dir $@)
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
# asm source
$(BUILD_DIR)/%.asm.o: %.asm
$(MKDIR_P) $(dir $@)
$(AS) $(ASFLAGS) -c $< -o $@
.PHONY: clean
clean:
$(RM) -r autorun* $(BUILD_DIR)
-include $(DEPS)
MKDIR_P ?= mkdir -p