summaryrefslogtreecommitdiffstats
path: root/tools/make.inc
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-09-22 08:58:50 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-09-22 08:58:50 +0000
commitfc1e925c16c417f08453509926b1186baa0c6228 (patch)
treeb9ed06d3a23cca7aeb98573efac23f751c19665e /tools/make.inc
parentceceba6d3b835e9e8abe9d3ba117f876a848a3df (diff)
downloadrockbox-fc1e925c16c417f08453509926b1186baa0c6228.tar.gz
rockbox-fc1e925c16c417f08453509926b1186baa0c6228.zip
Rearranged makefiles again to move platform-specific stuff from the Makefiles
to either the configure script or to be ifdefed in the sources. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5103 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/make.inc')
-rw-r--r--tools/make.inc21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/make.inc b/tools/make.inc
new file mode 100644
index 0000000000..f83be7990a
--- /dev/null
+++ b/tools/make.inc
@@ -0,0 +1,21 @@
+$(OBJDIR)/%.o: %.c
+ @mkdir -p `dirname $@`
+ @echo "CC $<"
+ @$(CC) $(CFLAGS) -c $< -o $@
+
+$(OBJDIR)/%.o: %.S
+ @mkdir -p `dirname $@`
+ @echo "CC $<"
+ @$(CC) $(CFLAGS) -c $< -o $@
+
+$(DEPFILE): $(SOURCES)
+ @rm -f $(DEPFILE)
+ @(for each in $(SOURCES); do \
+ obj=`echo $$each | sed -e 's/\.c/.o/'`; \
+ $(CC) -MM -MT "$(OBJDIR)/$$obj.o" $(CFLAGS) $$each >> $(DEPFILE) 2>/dev/null; \
+ done )
+
+tags:
+ @(for d in $(DIRS); do \
+ etags -o $(OBJDIR)/TAGS -a $$d/*.[ch]; \
+ done)