summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Mohr <manuel.mohr@kit.edu>2013-11-19 14:29:31 +0100
committerManuel Mohr <manuel.mohr@kit.edu>2013-11-19 14:29:31 +0100
commit810e626b12e5facf4f8c254f101edc5bcaf51076 (patch)
tree8f27d1018c6abd5c8cdc3a58f01f62b71cd5f389
parent01a8a1f414fa6884e851a15e8886e5ef7f2c0a37 (diff)
Add minimal Makefile support for special platform-specific objects.
-rw-r--r--Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b2c8fee..6426b78 100644
--- a/Makefile
+++ b/Makefile
@@ -102,17 +102,28 @@ Q = @
all: $(ARCHIVE)
-$(ARCHIVE): $(BUILDDIR) $(OBJECTS)
+$(ARCHIVE): $(BUILDDIR) $(OBJECTS) $(EXTRA_OBJECTS)
$(Q)ar ru $(ARCHIVE) $(OBJECTS) $(EXTRA_OBJECTS)
$(BUILDDIR)/%.o: %.c
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
+# Special objects
+libatomic_ops/libatomic_ops.a: libatomic_ops/src/atomic_ops.o
+ $(Q)ar ru $@ $<
+
+libatomic_ops/src/atomic_ops.o: libatomic_ops/src/atomic_ops.c
+ $(Q)$(CC) -c $< -o $@
+
+src/sparc_mach_dep.o: src/sparc_mach_dep.S
+ $(Q)$(CC) -c $< -o $@
+
$(BUILDDIR):
$(Q)mkdir -p $(BUILDDIR)
clean:
$(Q)rm -f $(OBJECTS)
+ $(Q)rm -f $(EXTRA_OBJECTS)
$(Q)rm -f $(ARCHIVE)
$(Q)rm -rf $(BUILDDIR)