/
makefile
36 lines (29 loc) · 901 Bytes
/
makefile
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
#----------------------------
# Makefile
#----------------------------
# common/os specific things
ifeq ($(OS),Windows_NT)
SHELL = cmd.exe
NATIVEPATH = $(subst /,\,$(1))
WINPATH = $(NATIVEPATH)
RM = del /f 2>nul
CEDEV ?= C:\CEdev
BIN ?= $(CEDEV)/bin
CC = $(call NATIVEPATH,$(BIN)/ez80cc.exe)
else
NATIVEPATH = $(subst \,/,$(1))
WINPATH = $(subst \,\\,$(shell winepath --windows $(1)))
RM = rm -f
CEDEV ?= $(HOME)/CEdev
BIN ?= $(CEDEV)/bin
CC = $(call NATIVEPATH,wine $(BIN)/ez80cc.exe)
endif
CCFLGS := -noasm -nodebug -nogenprint -nokeeplst -keepasm -promote -quiet -fplib -optsize -cpu:EZ80F91 -stdinc:"..;..\\..\\fileioc;..\\..\\ce" -define:_EZ80F91 -define:_EZ80
EZC := $(wildcard *.c)
EZSRC := $(EZC:%.c=%.src)
all: $(EZSRC)
%.src: %.c
$(CC) $(CCFLGS) $(call WINPATH,$<)
clean:
$(RM) $(EZSRC)
.PHONY: all clean