Skip to content

Commit fdab701

Browse files
Better
1 parent f360d75 commit fdab701

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

CEdev/bin/main_makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,8 @@ all : $(BINDIR)/$(TARGETTYPE)
203203

204204
#This rule builds the Intel HEX file
205205
$(BINDIR)/$(TARGETHEX) : $(OBJECTS) $(LIBRARIES)
206-
@echo C CE SDK Version $(VERSION)
207206
@if not exist $(BINDIR) mkdir $(BINDIR)
208-
@if not exist $(OBJDIR) mkdir $(OBJDIR)
207+
@echo C CE SDK Version $(VERSION)
209208
@$(LD) $(LDFLAGS) $@ = "$(subst $(space),$(comma),$(call WINPATH,$^))$(LOBJECTS)"
210209

211210
#These rules use ConvHEX to convert the Intel HEX file to a calculator format
@@ -218,37 +217,44 @@ $(BINDIR)/$(TARGETHEX) : $(OBJECTS) $(LIBRARIES)
218217

219218
#This rule handles conversion of the icon, if it is ever updated
220219
$(OBJDIR)/$(ICON_OBJ) : $(ICONPNG)
220+
@if not exist $(OBJDIR) mkdir $(OBJDIR)
221221
@$(ICON_CONV) && \
222222
@$(CD) $(OBJDIR) && \
223223
@$(AS) $(ASM_FLAGS) $(ICON_ASM)
224224

225225
#This rule builds the assembly files and places them in the object directory
226226
$(OBJDIR)/%.obj : $(SRCDIR)/%.asm
227+
@if not exist $(OBJDIR) mkdir $(OBJDIR)
227228
@$(CD) $(OBJDIR) && \
228229
@$(AS) $(ASM_FLAGS) $(call WINPATH,$(addprefix $(CURDIR)/,$<))
229230

230231
#These rules compile the source files into object files
231232
$(OBJDIR)/%.obj : $(SRCDIR)/%.c
233+
@if not exist $(OBJDIR) mkdir $(OBJDIR)
232234
@$(CD) $(OBJDIR) && \
233235
@$(CC) $(CFLAGS) $(call WINPATH,$(addprefix $(CURDIR)/,$<))
234236

235237
$(OBJDIR)/%.obj : $(GFXDIR)/%.c
238+
@if not exist $(OBJDIR) mkdir $(OBJDIR)
236239
@$(CD) $(OBJDIR) && \
237240
@$(CC) $(CFLAGS) $(call WINPATH,$(addprefix $(CURDIR)/,$<))
238241

239242
#This rule builds the standard startup module (Which is nice, because then it is completely customizable)
240243
$(OBJDIR)/$(CSTARTUP_OBJ) : $(CSTARTUP_LOC)
244+
@if not exist $(OBJDIR) mkdir $(OBJDIR)
241245
@$(CD) $(OBJDIR) && \
242246
@$(AS) $(ASM_FLAGS) $(call WINPATH,$<)
243247

244248
#This rule builds the LibLoad library locater object
245249
$(OBJDIR)/$(LIBHEADER_OBJ) : $(LIBHEADER_LOC)
250+
@if not exist $(OBJDIR) mkdir $(OBJDIR)
246251
@$(CD) $(OBJDIR) && \
247252
@$(AS) $(ASM_FLAGS) $(call WINPATH,$<)
248253
@$(CD) $(OBJDIR) && \
249254
@$(CC) $(CFLAGS) -asm $(LIBS)
250255

251256
$(OBJDIR)/%.obj :
257+
@if not exist $(OBJDIR) mkdir $(OBJDIR)
252258

253259
#This rule cleans up everything
254260
clean :

0 commit comments

Comments
 (0)