ovr_sdk
diff LibOVR/Makefile @ 2:e01da1033ca5
first wave of modifications
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 14 Jan 2015 06:58:21 +0200 |
parents | 1b39a1b46319 |
children |
line diff
1.1 --- a/LibOVR/Makefile Wed Jan 14 06:51:30 2015 +0200 1.2 +++ b/LibOVR/Makefile Wed Jan 14 06:58:21 2015 +0200 1.3 @@ -74,9 +74,19 @@ 1.4 STATIC_TARGET = $(TARGET_DIR)/$(STATIC_NAME) 1.5 LIBOVR_INST_HDR = Src/OVR_CAPI.h Src/OVR_CAPI_Keys.h Src/OVR_CAPI_GL.h 1.6 1.7 +SHARED_BASE = libovr.so 1.8 +SHARED_SONAME = $(SHARED_BASE).$(SHARED_MAJOR) 1.9 +SHARED_NAME = $(SHARED_BASE).$(SHARED_MAJOR).$(SHARED_MINOR).$(SHARED_RELEASE) 1.10 +SHARED_TARGET = $(TARGET_DIR)/$(SHARED_NAME) 1.11 +SHARED_MAJOR = 0 1.12 +SHARED_MINOR = 2 1.13 +SHARED_RELEASE = 1 1.14 + 1.15 +LIBOVR_INST_HDR = Src/OVR_CAPI.h Src/OVR_CAPI_Keys.h Src/OVR_CAPI_GL.h 1.16 + 1.17 ####### Rules 1.18 1.19 -all: $(STATIC_TARGET) 1.20 +all: $(STATIC_TARGET) $(SHARED_TARGET) 1.21 1.22 OTHER_SOURCE = $(3RDPARTYPATH)/EDID/edid.cpp \ 1.23 $(3RDPARTYPATH)/TinyXml/tinyxml2.cpp 1.24 @@ -151,6 +161,25 @@ 1.25 @mkdir -p $(@D) 1.26 ar rvs $(STATIC_TARGET) $(OBJECTS) 1.27 1.28 +$(SHARED_TARGET): $(OBJECTS) 1.29 + @mkdir -p $(@D) 1.30 + $(CXX) -shared -Wl,-soname,$(SHARED_SONAME) -o $@ $(OBJECTS) $(LDFLAGS) 1.31 + 1.32 clean: 1.33 -$(DELETEFILE) $(OBJECTS) 1.34 -$(DELETEFILE) $(STATIC_TARGET) 1.35 + -$(DELETEFILE) $(SHARED_TARGET) 1.36 + 1.37 + 1.38 +install: $(SHARED_TARGET) $(STATIC_TARGET) 1.39 + mkdir -p $(DESTDIR)$(PREFIX)/include $(DESTDIR)$(PREFIX)/lib 1.40 + cp $(LIBOVR_INST_HDR) $(DESTDIR)$(PREFIX)/include 1.41 + cp $(STATIC_TARGET) $(SHARED_TARGET) $(DESTDIR)$(PREFIX)/lib 1.42 + cd $(DESTDIR)$(PREFIX)/lib && \ 1.43 + rm -f $(SHARED_BASE) $(SHARED_SONAME) && \ 1.44 + ln -s $(SHARED_NAME) $(SHARED_SONAME) && \ 1.45 + ln -s $(SHARED_SONAME) $(SHARED_BASE) 1.46 + 1.47 +uninstall: 1.48 + -cd $(DESTDIR)$(PREFIX)/include && rm -f $(LIBOVR_INST_HDR) 1.49 + -cd $(DESTDIR)$(PREFIX)/lib && rm -f $(SHARED_BASE) $(SHARED_SONAME) $(SHARED_NAME)