summaryrefslogtreecommitdiff
path: root/io/lib/Makefile
diff options
context:
space:
mode:
authorManuel Traut <manut@mecka.net>2012-06-07 13:52:08 +0200
committerManuel Traut <manut@mecka.net>2012-06-07 13:52:08 +0200
commit986a4e78ce5461dc0ada66169bb9111fb0346c46 (patch)
treeff2c7cf1740688313547190fa7626e4543483538 /io/lib/Makefile
parente84faa1a220ebdcf79a3d95e539dfc8d86a8c460 (diff)
cleanup project structure
move some subprojects fixup makefiles Signed-off-by: Manuel Traut <manut@mecka.net>
Diffstat (limited to 'io/lib/Makefile')
-rw-r--r--io/lib/Makefile45
1 files changed, 45 insertions, 0 deletions
diff --git a/io/lib/Makefile b/io/lib/Makefile
new file mode 100644
index 0000000..4b79e01
--- /dev/null
+++ b/io/lib/Makefile
@@ -0,0 +1,45 @@
+CC := $(CROSS_COMPILE)gcc
+CXX := $(CROSS_COMPILE)g++
+LD := $(CROSS_COMPILE)g++
+
+DISTRIO_BASE = ../../
+
+DISTRIO_COMMON := $(DISTRIO_BASE)common
+
+CFLAGS += -fPIC -I$(DISTRIO_COMMON)
+CXXFLAGS += $(CFLAGS)
+
+TAO_IDL := tao_idl
+
+DESTDIR := /usr
+
+COMPONENT = distrio_io
+LIB = lib$(COMPONENT).so
+OBJ = $(COMPONENT)C.o $(COMPONENT).o $(COMPONENT)S.o
+
+IDL_CLEANFILES = $(COMPONENT)C.cpp $(COMPONENT)C.inl $(COMPONENT)I.h \
+ $(COMPONENT)S.h $(COMPONENT)C.h $(COMPONENT)S.cpp
+
+all: $(OBJ)
+ $(LD) -shared -o $(LIB) $(OBJ)
+
+.PHONY: idl
+idl:
+ $(TAO_IDL) -GI -I$(DISTRIO_BASE)interfaces \
+ $(DISTRIO_BASE)interfaces/$(COMPONENT).idl
+ rm -f $(COMPONENT)I.cpp
+
+.PHONY: idl_clean
+idl_clean:
+ rm -f $(IDL_CLEANFILES)
+
+.PHONY: clean
+clean: idl_clean
+ rm -f *.o
+ rm -f $(LIB)
+
+install: all
+ cp -a $(LIB) $(DESTDIR)/lib
+
+uninstall:
+ rm -f $(DESTDIR)/lib/$(LIB)