Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated build system to produce a library to be linked in with the HAL

  • Loading branch information...
commit 5d196dc6f21754042029dcea9683add9f4defda8 1 parent 94a09f6
Dan Schatzberg dschatzberg authored
1  .gitignore
View
@@ -0,0 +1 @@
+*~
3  README
View
@@ -1 +1,4 @@
System independent library to support Elastic Building Blocks
+
+To build - overwrite any settings by making build/Makeconf
+ In particular, make sure that the path to L4hal is correct
4 build/.gitignore
View
@@ -0,0 +1,4 @@
+Makeconf
+*.d
+*.o
+*.a
43 build/Makefile
View
@@ -0,0 +1,43 @@
+-include Makeconf
+
+CC ?= gcc
+
+TOOLPREFIX ?=
+AR ?= $(TOOLPREFIX)ar
+
+SRCDIR := ../src
+L4HALDIR ?= ../../l4hal/
+
+DEFINES ?= L4
+
+INC_DIR := $(L4HALDIR)include
+
+VPATH := $(SRCDIR)
+
+SRCFILES := $(shell find $(SRCDIR) -type f -name "*.c")
+SRCFILES := $(notdir $(SRCFILES))
+HDRFILES := $(shell find $(SRCDIR) -type f -name "*.h")
+
+OBJFILES := $(patsubst %.c, %.o, $(SRCFILES))
+DEPFILES := $(patsubst %.c, %.d, $(SRCFILES))
+
+WARNINGS := -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes
+CFLAGS ?= -g -O2 $(WARNINGS) $(addprefix -I,$(INC_DIR)) \
+ $(addprefix -D,$(DEFINES))
+
+EBBLIB := ebblib.a
+
+.PHONY: all clean
+
+all: $(EBBLIB)
+
+$(EBBLIB): $(OBJFILES)
+ $(AR) r $@ $?
+
+clean:
+ rm $(wildcard $(OBJFILES) $(DEPFILES) $(EBBLIB))
+
+-include $(DEPFILES)
+
+%.o: %.c Makefile
+ $(CC) $(CFLAGS) -MMD -MP -c $< -o $@
0  include/ebblib/counter.h → src/counter.h
View
File renamed without changes
4 counter_shared.cc → src/counter_shared.c
View
@@ -1,5 +1,5 @@
-#include <ebblib/ebb.h>
-#include <ebblib/counter.h>
+#include "ebb.h"
+#include "counter.h"
struct CounterData_struct {
Counter *self;
0  include/ebblib/ebb.h → src/ebb.h
View
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.