symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/target.mak
branchgraphics-phase-3
changeset 115 7fc47a6656f3
parent 114 19c4533e1567
child 116 912422215015
equal deleted inserted replaced
114:19c4533e1567 115:7fc47a6656f3
     1 # Copyright (c) 2010 Symbian Foundation.
       
     2 # All rights reserved.
       
     3 # This component and the accompanying materials are made available
       
     4 # under the terms of the License "Eclipse Public License v1.0"
       
     5 # which accompanies this distribution, and is available
       
     6 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 #
       
     8 # Description:
       
     9 # Bottom level Makefile to build syborg-graphicswrapper library in the current directory
       
    10 
       
    11 include ../../../qemu-symbian-svp/config-host.mak
       
    12 
       
    13 sources := syborg-graphicswrapper.cpp
       
    14 objs := syborg-graphicswrapper.o
       
    15 libname := libsyborg-graphicswrapper.so
       
    16 soname := $(libname).1
       
    17 targ := $(soname).0
       
    18  
       
    19 .phony: all build clean install distclean uninstall
       
    20 
       
    21 cflags=-DHAVE_STDINT_H -DSYBORG_GRAPHICSWRAPPER_EXPORTS
       
    22 ifneq ($(DEBUG_LIBS),)
       
    23 cflags+="-O0 -g"
       
    24 else
       
    25 cflags+=-O2
       
    26 endif
       
    27 
       
    28 vpath %.cpp ..
       
    29 
       
    30 all: $(targ)
       
    31 
       
    32 %.o : %.cpp
       
    33 	g++ $(cflags) -fPIC -I../../commoninc -c -o $@ $<
       
    34 
       
    35 $(objs): $(sources)
       
    36 
       
    37 $(targ): $(objs)
       
    38 	g++ $(cflags) -shared -Wl,-soname,$(soname) -Wl,-l,stdc++ -o $@ $(objs)
       
    39 
       
    40 clean:
       
    41 	rm -f $(objs) $(targ)
       
    42 
       
    43 install: $(targ)
       
    44 	if [ ! -d "$(DESTDIR)$(libdir)" ]; then mkdir -p "$(DESTDIR)$(libdir)"; fi && \
       
    45 	$(INSTALL) -m 755 $(targ) "$(DESTDIR)$(libdir)" && \
       
    46 	rm -f "$(DESTDIR)$(libdir)/$(libname)" && \
       
    47 	ln -s "$(DESTDIR)$(libdir)/$(targ)" "$(DESTDIR)$(libdir)/$(libname)"
       
    48 
       
    49 distclean: clean
       
    50 #	Nothing for distclean
       
    51 
       
    52 uninstall:
       
    53 	rm -f "$(DESTDIR)$(libdir)/$(libname)" "$(DESTDIR)$(libdir)/$(targ)" && \
       
    54 	files=`ls -A "$(DESTDIR)$(libdir)"` && \
       
    55 	if [ -z "$$files" ]; then rmdir "$(DESTDIR)$(libdir)"; fi
       
    56 
       
    57 
       
    58