diff options
Diffstat (limited to 'common/Makefile')
| -rw-r--r-- | common/Makefile | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/common/Makefile b/common/Makefile index d4f0594..441b13f 100644 --- a/common/Makefile +++ b/common/Makefile @@ -2,27 +2,35 @@ CC := $(CROSS_COMPILE)gcc CXX := $(CROSS_COMPILE)g++ LD := $(CROSS_COMPILE)g++ +CFLAGS += -fPIC +CXXFLAGS += $(CFLAGS) + TAO_IDL := tao_idl DESTDIR := /usr -LIB = libdistrio_common.so -OBJ = commonC.o common.o commonS.o +COMPONENT = distrio_common +LIB = lib$(COMPONENT).so +OBJ = $(COMPONENT)C.o $(COMPONENT).o $(COMPONENT)S.o -IDL_CLEANFILES = commonC.cpp commonC.inl commonI.h commonS.h commonC.h \ - commonS.cpp +IDL_CLEANFILES = $(COMPONENT)C.cpp $(COMPONENT)C.inl $(COMPONENT)I.h \ + $(COMPONENT)S.h $(COMPONENT)C.h $(COMPONENT)S.cpp -all: idl $(OBJ) +all: $(OBJ) $(LD) -shared -o $(LIB) $(OBJ) +.PHONY: idl idl: - $(TAO_IDL) -GI -I../interfaces ../interfaces/common.idl - rm -f commonI.cpp + $(TAO_IDL) -GI -I../interfaces ../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 |
