@@ -6,8 +6,11 @@ CSTARTUP_ASM := cstartup.asm
6
6
LIBHEADER_ASM := libheader.asm
7
7
#----------------------------
8
8
9
+ SHELL := cmd.exe
10
+ VERSION := 6.5
11
+
9
12
#----------------------------
10
- #Try not to edit anything below these lines unless you know what you are doing
13
+ # Try not to edit anything below these lines unless you know what you are doing
11
14
#----------------------------
12
15
13
16
#----------------------------
@@ -200,13 +203,17 @@ all : $(BINDIR)/$(TARGETTYPE)
200
203
201
204
#This rule builds the Intel HEX file
202
205
$(BINDIR)/$(TARGETHEX) : $(OBJECTS) $(LIBRARIES)
206
+ @if not exist $(BINDIR) mkdir $(BINDIR)
207
+ @if not exist $(OBJDIR) mkdir $(OBJDIR)
203
208
@$(LD) $(LDFLAGS) $@ = "$(subst $(space),$(comma),$(call WINPATH,$^))$(LOBJECTS)"
204
209
205
210
#These rules use ConvHEX to convert the Intel HEX file to a calculator format
206
211
%.8xv : %.hex
207
- @$(CV) $(CVFLAGS) $(@:%.8xv=%)
212
+ @$(CD) $(BINDIR) && \
213
+ @$(CV) $(CVFLAGS) $(notdir $(@:%.8xv=%))
208
214
%.8xp : %.hex
209
- @$(CV) $(CVFLAGS) $(@:%.8xp=%)
215
+ @$(CD) $(BINDIR) && \
216
+ @$(CV) $(CVFLAGS) $(notdir $(@:%.8xp=%))
210
217
211
218
#This rule handles conversion of the icon, if it is ever updated
212
219
$(OBJDIR)/$(ICON_OBJ) : $(ICONPNG)
@@ -240,12 +247,14 @@ $(OBJDIR)/$(LIBHEADER_OBJ) : $(LIBHEADER_LOC)
240
247
@$(CD) $(OBJDIR) && \
241
248
@$(CC) $(CFLAGS) -asm $(LIBS)
242
249
243
- #This is just a silly rule needed for the icon conversion to work properly
244
250
$(OBJDIR)/%.obj :
245
251
246
252
#This rule cleans up everything
247
253
clean :
248
254
@$(RM) $(call WINPATH,$(BINDIR)/$(TARGETHEX) $(BINDIR)/$(TARGETTYPE) $(BINDIR)/$(TARGETMAP) $(OBJECTS) $(OBJDIR)/*.src $(OBJDIR)/$(ICON_ASM)) $(NULL)
249
255
@echo Cleaned build files.
250
256
257
+ version :
258
+ @echo C CE SDK Version $(VERSION)
259
+
251
260
.PHONY : all clean
0 commit comments