sync with tizen_2.2
[sdk/emulator/qemu.git] / gl / dgles2 / include / Makefile
1 # Copyright (C) 2010  Nokia Corporation All Rights Reserved.
2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the "Software"),
5 # to deal in the Software without restriction, including without limitation
6 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 # and/or sell copies of the Software, and to permit persons to whom the
8 # Software is furnished to do so, subject to the following conditions:
9 #
10 # The above copyright notice and this permission notice shall be included
11 # in all copies or substantial portions of the Software.
12 #
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
16 # BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
17 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18 # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
20 include $(T)/common.mak
21
22 SUBDIRS=EGL GLES GLES2 KHR
23
24 # Pathify.
25 P_O := $(call pathify,$(O))
26 P_S := $(call pathify,$(S))
27 P_T := $(call pathify,$(T))
28 P_I := $(call pathify,$(I))
29
30 all:    $(addsuffix -all, $(SUBDIRS))
31 clean:  $(addsuffix -clean, $(SUBDIRS))
32 distclean:      $(addsuffix -distclean, $(SUBDIRS))
33 depend: $(addsuffix -depend, $(SUBDIRS))
34 install:        $(addsuffix -install, $(SUBDIRS))
35
36 define SUBDIR_template
37 $(1)-all:
38         make -C $(1) all O=../$(P_O) T=../$(P_T)
39 $(1)-clean:
40         make -C $(1) clean O=../$(P_O) T=../$(P_T)
41 $(1)-distclean:
42         make -C $(1) distclean O=../$(P_O) T=../$(P_T)
43 $(1)-depend:
44         make -C $(1) depend O=../$(P_O) T=../$(P_T)
45 $(1)-install:
46         make -C $(1) install O=../$(P_O) I=$(P_I) T=../$(P_T)
47 endef
48
49 $(foreach SUBDIR,$(SUBDIRS),$(eval $(call SUBDIR_template,$(SUBDIR))))