summaryrefslogtreecommitdiff
path: root/io/lib/Makefile
diff options
context:
space:
mode:
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)