Skip to content

Commit c3135e0

Browse files
Added makefiles and defined 'all' and 'clean'
1 parent 6fc68e8 commit c3135e0

File tree

245 files changed

+884
-320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

245 files changed

+884
-320
lines changed

.gitmodules

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
[submodule "src/tools/spasm"]
2-
path = src/tools/spasm
3-
url = https://github.com/alberthdev/spasm-ng
41
[submodule "src/tools/convtile"]
5-
path = src/tools/convtile
2+
path = tools/convtile
63
url = https://github.com/MattWaltz/convtile
74
[submodule "src/tools/convhex"]
8-
path = src/tools/convhex
5+
path = tools/convhex
96
url = https://github.com/MattWaltz/convhex
107
[submodule "src/tools/convpng"]
11-
path = src/tools/convpng
8+
path = tools/convpng
129
url = https://github.com/MattWaltz/convpng
10+
[submodule "tools/spasm-ng"]
11+
path = tools/spasm-ng
12+
url = https://github.com/jacobly0/spasm-ng

makefile

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
#----------------------------
2+
# Makefile
3+
#----------------------------
4+
5+
# defult make type
6+
MAKE ?= make
7+
8+
# common/os specific things
9+
ifeq ($(OS),Windows_NT)
10+
NATIVEPATH = $(subst /,\,$(1))
11+
WINPATH = $(NATIVEPATH)
12+
RM = del /f 2>nul
13+
else
14+
NATIVEPATH = $(subst \,/,$(1))
15+
WINPATH = $(shell winepath --windows $(1))
16+
RM = rm --force
17+
endif
18+
19+
TOOLSDIR := $(call NATIVEPATH,$(CURDIR)/tools)
20+
SRCDIR := $(call NATIVEPATH,$(CURDIR)/src)
21+
SPASMDIR := $(call NATIVEPATH,$(TOOLSDIR)/spasm-ng)
22+
CONVHEXDIR := $(call NATIVEPATH,$(TOOLSDIR)/convhex)
23+
CONVPNGDIR := $(call NATIVEPATH,$(TOOLSDIR)/convpng)
24+
25+
CEDIR := $(call NATIVEPATH,$(SRCDIR)/ce)
26+
STDDIR := $(call NATIVEPATH,$(SRCDIR)/std)
27+
28+
SPASM := $(call NATIVEPATH,$(SPASMDIR)/spasm)
29+
CONVHEX := $(call NATIVEPATH,$(CONVHEXDIR)/convhex)
30+
CONVPNG := $(call NATIVEPATH,$(CONVPNGDIR)/convpng)
31+
32+
BIN := $(call NATIVEPATH,$(TOOLSDIR)/zds)
33+
34+
GRAPHXDIR := $(call NATIVEPATH,$(SRCDIR)/graphx)
35+
KEYPADCDIR := $(call NATIVEPATH,$(SRCDIR)/keypadc)
36+
FILEIOCDIR := $(call NATIVEPATH,$(SRCDIR)/fileioc)
37+
38+
all: $(SPASM) $(CONVHEX) $(CONVPNG) all-graphx all-fileioc all-keypadc all-ce all-std
39+
40+
#----------------------------
41+
# tool rules
42+
#----------------------------
43+
$(SPASM) $(CONVHEX) $(CONVPNG):
44+
$(MAKE) -C $(dir $@)
45+
46+
clean: clean-graphx clean-fileioc clean-keypadc clean-ce clean-std
47+
$(MAKE) -C $(SPASMDIR) clean
48+
$(MAKE) -C $(CONVHEXDIR) clean
49+
$(MAKE) -C $(CONVPNGDIR) clean
50+
#----------------------------
51+
52+
#----------------------------
53+
# ce rules
54+
#----------------------------
55+
all-ce:
56+
$(MAKE) -C $(CEDIR) BIN=$(BIN)
57+
clean-ce:
58+
$(MAKE) -C $(CEDIR) clean
59+
#----------------------------
60+
61+
#----------------------------
62+
# std rules
63+
#----------------------------
64+
all-std:
65+
$(MAKE) -C $(STDDIR) BIN=$(BIN)
66+
clean-std:
67+
$(MAKE) -C $(STDDIR) clean
68+
#----------------------------
69+
70+
#----------------------------
71+
# graphx rules
72+
#----------------------------
73+
all-graphx: $(SPASM)
74+
$(MAKE) -C $(GRAPHXDIR) SPASM=$(SPASM) BIN=$(BIN)
75+
76+
clean-graphx:
77+
$(MAKE) -C $(GRAPHXDIR) clean
78+
#----------------------------
79+
80+
#----------------------------
81+
# fileioc rules
82+
#----------------------------
83+
all-fileioc: $(SPASM)
84+
$(MAKE) -C $(FILEIOCDIR) SPASM=$(SPASM) BIN=$(BIN)
85+
86+
clean-fileioc:
87+
$(MAKE) -C $(FILEIOCDIR) clean
88+
#----------------------------
89+
90+
#----------------------------
91+
# keypadc rules
92+
#----------------------------
93+
all-keypadc: $(SPASM)
94+
$(MAKE) -C $(KEYPADCDIR) SPASM=$(SPASM) BIN=$(BIN)
95+
96+
clean-keypadc:
97+
$(MAKE) -C $(KEYPADCDIR) clean
98+
#----------------------------
99+
100+
.PHONY: all clean all-graphx clean-graphx all-fileioc clean-fileioc all-keypadc clean-keypadc
101+

src/ce/makefile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#----------------------------
2+
# Makefile
3+
#----------------------------
4+
5+
# set LIB_LIB to the name of the library
6+
LIB_LIB := cce
7+
8+
# common/os specific things
9+
ifeq ($(OS),Windows_NT)
10+
NATIVEPATH = $(subst /,\,$(1))
11+
WINPATH = $(NATIVEPATH)
12+
RM = del /f 2>nul
13+
CEDEV ?= C:\CEdev
14+
BIN ?= $(CEDEV)/bin
15+
ASM = $(call NATIVEPATH,$(BIN)/ez80asm.exe)
16+
LIB = $(call NATIVEPATH,$(BIN)/ez80lib.exe)
17+
else
18+
NATIVEPATH = $(subst \,/,$(1))
19+
WINPATH = $(subst \,\\,$(shell winepath --windows $(1)))
20+
RM = rm --force
21+
CEDEV ?= $(HOME)/CEdev
22+
BIN ?= $(CEDEV)/bin
23+
ASM = $(call NATIVEPATH,wine $(BIN)/ez80asm.exe)
24+
LIB = $(call NATIVEPATH,wine $(BIN)/ez80lib.exe)
25+
endif
26+
27+
ASMFLGS := -genobj -NOigcase -NOlist -NOlistmac -quiet -sdiopt -cpu:EZ80F91 -NOdebug
28+
LIBFLGS := -quiet -warn
29+
30+
all: $(patsubst %.asm,%.obj,$(wildcard *.asm))
31+
$(LIB) $(LIBFLGS) $(LIB_LIB)=+$<
32+
33+
%.obj: %.asm
34+
$(ASM) $(ASMFLGS) $(call WINPATH,$<)
35+
36+
clean:
37+
$(RM) $(LIB_LIB) *.obj
38+
39+
.PHONY: all clean
40+
File renamed without changes.

src/fileioc/makefile

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#----------------------------
2+
# Makefile
3+
#----------------------------
4+
5+
# set NAME to the name of the library
6+
# set SRC to the assembly source of the library
7+
NAME := fileioc
8+
SRC := fileioc.asm
9+
10+
# defult locations
11+
SPASM ?= spasm
12+
13+
# common/os specific things
14+
ifeq ($(OS),Windows_NT)
15+
NATIVEPATH = $(subst /,\,$(1))
16+
WINPATH = $(NATIVEPATH)
17+
RM = del /f 2>nul
18+
RMI = del /f 2>nul $(1)
19+
CEDEV ?= C:\CEdev
20+
BIN ?= $(CEDEV)/bin
21+
ASM = $(call NATIVEPATH,$(BIN)/ez80asm.exe)
22+
LIB = $(call NATIVEPATH,$(BIN)/ez80lib.exe)
23+
TOUCH = copy /b $(1)+,, $(1)
24+
else
25+
NATIVEPATH = $(subst \,/,$(1))
26+
WINPATH = $(subst \,\\,$(shell winepath --windows $(1)))
27+
RM = rm --force
28+
RMI = find . -maxdepth 1 -iname $(1) -exec rm {} \;
29+
CEDEV ?= $(HOME)/CEdev
30+
BIN ?= $(CEDEV)/bin
31+
ASM = $(call NATIVEPATH,wine $(BIN)/ez80asm.exe)
32+
LIB = $(call NATIVEPATH,wine $(BIN)/ez80lib.exe)
33+
TOUCH = touch $(1)
34+
endif
35+
36+
EZOBJ = $(wildcard *.obj)
37+
EZSRC = $(wildcard *.src)
38+
TBL = relocation_table
39+
40+
LIB_LIB := $(NAME).lib
41+
LIB_8XV := $(NAME).8xv
42+
LIB_ASM := $(NAME)_header.asm
43+
LIB_JMP := $(NAME)_equates.asm
44+
45+
ASMFLGS := -genobj -NOigcase -NOlist -NOlistmac -quiet -sdiopt -cpu:EZ80F91 -NOdebug
46+
LIBFLGS := -quiet -warn
47+
48+
all: $(LIB_8XV)
49+
$(RM) $(TBL)
50+
51+
$(LIB_8XV): $(SRC)
52+
$(RM) $(LIB_LIB)
53+
$(SPASM) -E $(SRC) $(LIB_8XV)
54+
$(MAKE) $(LIB_LIB)
55+
56+
$(LIB_LIB): $(LIB_LIB)($(EZSRC:.src=.obj))
57+
58+
(%.obj): %.obj
59+
$(LIB) $(LIBFLGS) $@=+-$%
60+
61+
%.obj: %.src
62+
$(ASM) $(ASMFLGS) $(call WINPATH,$<)
63+
$(RM) $<
64+
65+
clean:
66+
$(RM) $(LIB_8XV) $(LIB_LIB) $(LIB_8XV) $(LIB_JMP) $(EZOBJ) $(EZSRC) $(TBL)
67+
$(call RMI,$(LIB_ASM))
68+
$(call RMI,$(LIB_JMP))
69+
70+
.PHONY: all clean
71+

src/graphx/graphx.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "..\..\include\relocation.inc"
2-
#include "..\..\include\ti84pce.inc"
1+
#include "..\include\relocation.inc"
2+
#include "..\include\ti84pce.inc"
33

44
.libraryName "GRAPHX" ; Name of library
55
.libraryVersion 4 ; Version information (1-255)

src/graphx/makefile

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#----------------------------
2+
# Makefile
3+
#----------------------------
4+
5+
# set NAME to the name of the library
6+
# set SRC to the assembly source of the library
7+
NAME := graphx
8+
SRC := graphx.asm
9+
10+
# defult locations
11+
SPASM ?= spasm
12+
13+
# common/os specific things
14+
ifeq ($(OS),Windows_NT)
15+
NATIVEPATH = $(subst /,\,$(1))
16+
WINPATH = $(NATIVEPATH)
17+
RM = del /f 2>nul
18+
RMI = del /f 2>nul $(1)
19+
CEDEV ?= C:\CEdev
20+
BIN ?= $(CEDEV)/bin
21+
ASM = $(call NATIVEPATH,$(BIN)/ez80asm.exe)
22+
LIB = $(call NATIVEPATH,$(BIN)/ez80lib.exe)
23+
TOUCH = copy /b $(1)+,, $(1)
24+
else
25+
NATIVEPATH = $(subst \,/,$(1))
26+
WINPATH = $(subst \,\\,$(shell winepath --windows $(1)))
27+
RM = rm --force
28+
RMI = find . -maxdepth 1 -iname $(1) -exec rm {} \;
29+
CEDEV ?= $(HOME)/CEdev
30+
BIN ?= $(CEDEV)/bin
31+
ASM = $(call NATIVEPATH,wine $(BIN)/ez80asm.exe)
32+
LIB = $(call NATIVEPATH,wine $(BIN)/ez80lib.exe)
33+
TOUCH = touch $(1)
34+
endif
35+
36+
EZOBJ = $(wildcard *.obj)
37+
EZSRC = $(wildcard *.src)
38+
TBL = relocation_table
39+
40+
LIB_LIB := $(NAME).lib
41+
LIB_8XV := $(NAME).8xv
42+
LIB_ASM := $(NAME)_header.asm
43+
LIB_JMP := $(NAME)_equates.asm
44+
45+
ASMFLGS := -genobj -NOigcase -NOlist -NOlistmac -quiet -sdiopt -cpu:EZ80F91 -NOdebug
46+
LIBFLGS := -quiet -warn
47+
48+
all: $(LIB_8XV)
49+
$(RM) $(TBL)
50+
51+
$(LIB_8XV): $(SRC)
52+
$(RM) $(LIB_LIB)
53+
$(SPASM) -E $(SRC) $(LIB_8XV)
54+
$(MAKE) $(LIB_LIB)
55+
56+
$(LIB_LIB): $(LIB_LIB)($(EZSRC:.src=.obj))
57+
58+
(%.obj): %.obj
59+
$(LIB) $(LIBFLGS) $@=+-$%
60+
61+
%.obj: %.src
62+
$(ASM) $(ASMFLGS) $(call WINPATH,$<)
63+
$(RM) $<
64+
65+
clean:
66+
$(RM) $(LIB_8XV) $(LIB_LIB) $(LIB_8XV) $(LIB_JMP) $(EZOBJ) $(EZSRC) $(TBL)
67+
$(call RMI,$(LIB_ASM))
68+
$(call RMI,$(LIB_JMP))
69+
70+
.PHONY: all clean
71+

src/include/relocation.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
#define numrelocations 0
77

88
clr()
9-
wr("#define asmname ",name,".asm")
9+
wr("#define asmname ",name,"_header.asm")
1010
run()
1111
clr()
12-
wr("#define totname ",name,".jmp")
12+
wr("#define totname ",name,"_equates.asm")
1313
run()
1414

1515
#define noextname eval(name)
@@ -121,4 +121,4 @@
121121
#define __frame_arg8 30
122122
#define __frame_arg9 33
123123

124-
.list
124+
.list
File renamed without changes.

0 commit comments

Comments
 (0)