1 # $Date: 2009-03-12 21:32:16 +0100 (Do, 12. Mär 2009) $
3 #############################################################
5 .PHONY
: __default_rule
clean install nodebug \
6 all_subdirs clean_subdirs install_subdirs nodebug_subdirs
13 $(ECHO
) "Compile $(notdir $<)"
14 $(CC
) $(DEFINES
) $(CFLAGS
) -c
$< -o
$(OBJDIR
)/$*.o
18 #$(ECHO) "Compile $(notdir $<)"
19 #$(CC) $(DEFINES) $(CFLAGS) -c $< -o $(OBJDIR)/$*.o
20 #$(CC) -MM $(DEFINES) $(CFLAGS) -c $*.c -o $(OBJDIR)/$*.d
21 #$(FIXDEPS) $(OBJDIR)/$*.d
25 $(MAKE
) -s
--directory
=$(1) --file
="makefile-new" TOPLEVEL
="$(TOPLEVEL)" $(patsubst %_subdirs
,%,$@
);
29 -@
$(ECHO
) "Update dependencies for $<"; \
31 $(CC
) -MM
$(DEFINES
) $(CFLAGS
) $< > $@.
$$$$; \
32 sed
's,\($*\)\.o[ :]*,$(OBJDIR)/\1.o $@ : ,g' < $@.
$$$$ > $@
; \
40 @
$(ECHO
) "Assemble $<"
41 @
$(AS
) $(ASFLAGS
) $< TO
$(OBJDIR
)/$*.obj
42 @hunk2aout
$(OBJDIR
)/$*.obj
>/dev
/null
46 @
$(ECHO
) "Assemble $<"
47 @
$(AS
) $(ASFLAGS
) $< TO
$(OBJDIR
)/$*.obj
48 @hunk2aout
$(OBJDIR
)/$*.obj
>/dev
/null
52 -@splat
-s
-o
"d2(" "d1(" "#?.c"
54 all_subdirs clean_subdirs install_subdirs nodebug_subdirs
:
55 @
$(foreach subdir
,$(SUBDIRS
),$(call build_subdir
,$(subdir
))) true