use the -newos toolchain even if -elf is present.
[newos.git] / templates / compile.mk
blobbb4d7cd183b89952640fd48649f54500c92f5f37
1 # do not use directly, is included by other templates
3 # make sure the MY_CFLAGS_IN, MY_CPPFLAGS_IN, and MY_INCLUDES_IN vars are resolved when the rule is made
4 $(MY_COBJS_IN) $(MY_CPPOBJS_IN) $(MY_ASMOBJS_IN): MY_CFLAGS_IN:=$(MY_CFLAGS_IN)
5 $(MY_COBJS_IN) $(MY_CPPOBJS_IN) $(MY_ASMOBJS_IN): MY_CPPFLAGS_IN:=$(MY_CPPFLAGS_IN)
6 $(MY_COBJS_IN) $(MY_CPPOBJS_IN) $(MY_ASMOBJS_IN): MY_INCLUDES_IN:=$(MY_INCLUDES_IN)
8 # build rules
10 # empty rule for dependency files, they are built by the compile process
11 $(MY_TARGETDIR_IN)/%.d:
13 #$(warning MY_OBJS_IN = $(MY_OBJS_IN))
15 $(MY_CPPOBJS_IN): $(MY_TARGETDIR_IN)/%.o: $(MY_SRCDIR_IN)/%.cpp
16 @$(MKDIR)
17 @echo compiling $<
18 @$(CC) -c $< $(GLOBAL_CPPFLAGS) $(MY_CPPFLAGS_IN) $(MY_INCLUDES_IN) -MD -MT $@ -MF $(@:%o=%d) -o $@
20 $(MY_COBJS_IN): $(MY_TARGETDIR_IN)/%.o: $(MY_SRCDIR_IN)/%.c
21 @$(MKDIR)
22 @echo compiling $<
23 @$(CC) -c $< $(GLOBAL_CFLAGS) $(MY_CFLAGS_IN) $(MY_INCLUDES_IN) -MD -MT $@ -MF $(@:%o=%d) -o $@
25 $(MY_ASMOBJS_IN): $(MY_TARGETDIR_IN)/%.o: $(MY_SRCDIR_IN)/%.S
26 @$(MKDIR)
27 @echo assembling $<
28 @$(CC) -c $< $(GLOBAL_ASFLAGS) $(GLOBAL_CFLAGS) $(MY_CFLAGS_IN) $(MY_INCLUDES_IN) -MD -MT $@ -MF $(@:%o=%d) -o $@