Skip to content

Instantly share code, notes, and snippets.

@adriweb
Created December 26, 2017 16:38
Show Gist options
  • Save adriweb/012b1e4ef705cbedd29b8a37916e95c2 to your computer and use it in GitHub Desktop.
Save adriweb/012b1e4ef705cbedd29b8a37916e95c2 to your computer and use it in GitHub Desktop.
makefile ce toolchain llvm patch
59c59
< CC = clang -target ez80 -c
---
> CC = $(call NATIVEPATH,wine $(BIN)/ez80cc.exe)
82d81
< CPPSOURCES := $(call NATIVEPATH,$(foreach dir,$(ALLDIRS),$(wildcard $(dir)*.cpp)))
89d87
< OBJECTS += $(addprefix $(OBJDIR)/,$(notdir $(CPPSOURCES:%.cpp=%.cppobj)))
138c136
< HEADERS := $(subst $(space),;,$(call WINPATH,$(ALLDIRS) $(addprefix $(CEDEV)/,include include/compat include/ce include/std)))
---
> HEADERS := $(subst $(space),;,$(call WINPATH,$(ALLDIRS) $(addprefix $(CEDEV)/,include include/compat)))
147,151c145,148
< # Define the C flags used by the clang compiler
< CFLAGSOPT ?= -O3
< CFLAGSEXTRA ?= -W -Wall -Wwrite-strings -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -Wno-main-return-type $(EXTRA_CFLAGS)
< CDEFINES := -Dinterrupt=__attribute__\(\(__interrupt__\)\) -Ddouble=float -Dreentrant=
< CFLAGS := $(CFLAGSOPT) $(CFLAGSEXTRA) $(CDEFINES) -I/opt/CEdev/include/ -I/opt/CEdev/include/compat
---
> # define the C flags used by the Zilog compiler
> CFLAGS ?= \
> -define:_EZ80 -define:$(DEBUGMODE) -NOlistinc -NOmodsect -cpu:EZ80F91 -keepasm \
> $(OPTIM_OPT) -NOreduceopt -NOgenprintf -quiet -stdinc:"$(HEADERS)" -NOdebug -asmsw:"$(ASM_FLAGS)"
227,228c224,225
< # @$(CD) $(BINDIR) && \
< # $(CV) $(CVFLAGS) $(notdir $<)
---
> @$(CD) $(BINDIR) && \
> $(CV) $(CVFLAGS) $(notdir $<)
241,245c238
< $(CC) $(CFLAGS) $(addprefix $(CURDIR)/,$<)
<
< $(OBJDIR)/%.cppobj: $(SRCDIR)/%.cpp $(USERHEADERS)
< @$(CD) $(OBJDIR) && \
< $(CC) -std=c++1z -fno-exceptions $(CFLAGS) -o ../$@ $(addprefix $(CURDIR)/,$<)
---
> $(CC) $(CFLAGS) $(call WINPATH,$(addprefix $(CURDIR)/,$<))
264c257
< $(CC) $(CFLAGS) -o ../$@ $(addprefix $(CURDIR)/,$<)
---
> $(CC) $(CFLAGS) $(call WINPATH,$(addprefix $(CURDIR)/,$<))
272c265
< @$(RM) $(call NATIVEPATH,$(BINDIR)/$(TARGETHEX) $(BINDIR)/$(TARGETTYPE) $(BINDIR)/$(TARGETMAP) $(OBJDIR)/$(ICON_ASM) $(OBJDIR)/*.*obj $(OBJDIR)/*.src)
---
> @$(RM) $(call NATIVEPATH,$(BINDIR)/$(TARGETHEX) $(BINDIR)/$(TARGETTYPE) $(BINDIR)/$(TARGETMAP) $(OBJDIR)/$(ICON_ASM) $(OBJDIR)/*.obj $(OBJDIR)/*.src)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment