Skip to content

Commit 741c1ed

Browse files
Fix #43 and add version info
1 parent c6b23e7 commit 741c1ed

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

CEdev/bin/main_makefile

+13-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ CSTARTUP_ASM := cstartup.asm
66
LIBHEADER_ASM := libheader.asm
77
#----------------------------
88

9+
SHELL := cmd.exe
10+
VERSION := 6.5
11+
912
#----------------------------
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
1114
#----------------------------
1215

1316
#----------------------------
@@ -200,13 +203,17 @@ all : $(BINDIR)/$(TARGETTYPE)
200203

201204
#This rule builds the Intel HEX file
202205
$(BINDIR)/$(TARGETHEX) : $(OBJECTS) $(LIBRARIES)
206+
@if not exist $(BINDIR) mkdir $(BINDIR)
207+
@if not exist $(OBJDIR) mkdir $(OBJDIR)
203208
@$(LD) $(LDFLAGS) $@ = "$(subst $(space),$(comma),$(call WINPATH,$^))$(LOBJECTS)"
204209

205210
#These rules use ConvHEX to convert the Intel HEX file to a calculator format
206211
%.8xv : %.hex
207-
@$(CV) $(CVFLAGS) $(@:%.8xv=%)
212+
@$(CD) $(BINDIR) && \
213+
@$(CV) $(CVFLAGS) $(notdir $(@:%.8xv=%))
208214
%.8xp : %.hex
209-
@$(CV) $(CVFLAGS) $(@:%.8xp=%)
215+
@$(CD) $(BINDIR) && \
216+
@$(CV) $(CVFLAGS) $(notdir $(@:%.8xp=%))
210217

211218
#This rule handles conversion of the icon, if it is ever updated
212219
$(OBJDIR)/$(ICON_OBJ) : $(ICONPNG)
@@ -240,12 +247,14 @@ $(OBJDIR)/$(LIBHEADER_OBJ) : $(LIBHEADER_LOC)
240247
@$(CD) $(OBJDIR) && \
241248
@$(CC) $(CFLAGS) -asm $(LIBS)
242249

243-
#This is just a silly rule needed for the icon conversion to work properly
244250
$(OBJDIR)/%.obj :
245251

246252
#This rule cleans up everything
247253
clean :
248254
@$(RM) $(call WINPATH,$(BINDIR)/$(TARGETHEX) $(BINDIR)/$(TARGETTYPE) $(BINDIR)/$(TARGETMAP) $(OBJECTS) $(OBJDIR)/*.src $(OBJDIR)/$(ICON_ASM)) $(NULL)
249255
@echo Cleaned build files.
250256

257+
version :
258+
@echo C CE SDK Version $(VERSION)
259+
251260
.PHONY : all clean

0 commit comments

Comments
 (0)