~ubuntu-branches/ubuntu/raring/mesa/raring-proposed

« back to all changes in this revision

Viewing changes to src/glx/apple/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2011-06-19 21:26:00 UTC
  • mfrom: (1.6.1 upstream) (3.3.18 sid)
  • mto: (3.3.20 sid)
  • mto: This revision was merged to the branch mainline in revision 145.
  • Revision ID: james.westby@ubuntu.com-20110619212600-rleaapdmnbtstekb
Tags: 7.11~0-2
Thank you sbuild for giving a green light when that's not actually the
case. Fix missing Pre-Depends for the libegl1-mesa-drivers package
(multiarch-support).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
TOP = ../../..
 
2
 
 
3
include $(TOP)/configs/current
 
4
 
 
5
#CC=gcc
 
6
#GL_CFLAGS=-Wall -ggdb3 -Os -DPTHREADS -D_REENTRANT $(RC_CFLAGS) $(CFLAGS)
 
7
#GL_LDFLAGS=-L$(INSTALL_DIR)/lib -L$(X11_DIR)/lib $(LDFLAGS) -Wl,-single_module
 
8
 
 
9
TCLSH=tclsh8.5
 
10
MKDIR=mkdir
 
11
INSTALL=install
 
12
LN=ln
 
13
RM=rm
 
14
 
 
15
#INCLUDE=-I. -Iinclude -I.. -DGLX_ALIAS_UNSUPPORTED -I$(INSTALL_DIR)/include -I$(X11_DIR)/include
 
16
 
 
17
#COMPILE=$(CC) $(INCLUDE) $(GL_CFLAGS) -c
 
18
 
 
19
#The directory with the final binaries.
 
20
BUILD_DIR=builds
 
21
 
 
22
all: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
 
23
 
 
24
SOURCES = \
 
25
        apple_cgl.c \
 
26
        apple_glx.c \
 
27
        apple_glx_context.c \
 
28
        apple_glx_drawable.c \
 
29
        apple_glx_pbuffer.c \
 
30
        apple_glx_pixmap.c \
 
31
        apple_glx_surface.c \
 
32
        apple_visual.c \
 
33
        apple_glapi.c \
 
34
        apple_xgl_api_read.c \
 
35
        apple_xgl_api_stereo.c \
 
36
        apple_xgl_api_viewport.c \
 
37
        appledri.c \
 
38
        ../clientattrib.c \
 
39
        ../compsize.c \
 
40
        ../glxconfig.c \
 
41
        glx_empty.c \
 
42
        glx_error.c \
 
43
        ../glx_pbuffer.c \
 
44
        ../glx_query.c \
 
45
        ../glxcmds.c \
 
46
        ../glxcurrent.c \
 
47
        ../glxext.c \
 
48
        ../glxextensions.c \
 
49
        glxreply.c \
 
50
        ../pixel.c \
 
51
        ../xfont.c \
 
52
        ../applegl_glx.c
 
53
 
 
54
include $(TOP)/src/mesa/sources.mak
 
55
 
 
56
# override GLAPI_LIB
 
57
GLAPI_LIB = $(TOP)/src/mapi/glapi/libglapi.a
 
58
 
 
59
LDFLAGS += -lXplugin -framework ApplicationServices -framework CoreFoundation
 
60
 
 
61
OBJECTS = $(SOURCES:.c=.o)
 
62
 
 
63
INCLUDES = -I. -Iinclude -I..\
 
64
        -I$(TOP)/include \
 
65
        -I$(TOP)/include/GL/internal \
 
66
        -I$(TOP)/src/mesa \
 
67
        -I$(TOP)/src/mesa/main \
 
68
        -I$(TOP)/src/mapi \
 
69
        -I$(TOP)/src/mapi/glapi \
 
70
        $(LIBDRM_CFLAGS) \
 
71
        $(DRI2PROTO_CFLAGS) \
 
72
        $(X11_INCLUDES)
 
73
 
 
74
##### RULES #####
 
75
 
 
76
.c.o:
 
77
        $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
 
78
 
 
79
.S.o:
 
80
        $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES)  $< -o $@
 
81
 
 
82
##### TARGETS #####
 
83
 
 
84
default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
 
85
 
 
86
# Make libGL
 
87
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME):  $(OBJECTS) $(GLAPI_LIB) Makefile
 
88
        $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
 
89
                -major 1 -minor 2 $(MKLIB_OPTIONS) \
 
90
                -install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/lib$(GL_LIB).1.dylib \
 
91
                $(GL_LIB_DEPS) $(OBJECTS) $(GLAPI_LIB)
 
92
 
 
93
$(GLAPI_LIB):
 
94
        @$(MAKE) -C $(TOP)/src/mapi/glapi
 
95
 
 
96
depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES) Makefile
 
97
        rm -f depend
 
98
        touch depend
 
99
        $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) \
 
100
                $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES) 
 
101
 
 
102
# Emacs tags
 
103
tags:
 
104
        etags `find . -name \*.[ch]` `find $(TOP)/include`
 
105
 
 
106
install_headers: include/GL/gl.h
 
107
        $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
 
108
        $(INSTALL) -m 644 include/GL/gl.h $(DESTDIR)$(INSTALL_DIR)/include/GL
 
109
 
 
110
install_libraries: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
 
111
        $(MAKE) -C $(TOP)/src/mesa install-libgl
 
112
 
 
113
install: install_libraries
 
114
 
 
115
# Remove .o and backup files
 
116
clean:
 
117
        -rm -f *.o *.a *~
 
118
        -rm -f *.c~ *.h~
 
119
        -rm -f *.dylib
 
120
        -rm -f include/GL/gl.h
 
121
        -rm -f $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB)
 
122
        -rm -f *.o *~
 
123
        -rm -f depend depend.bak
 
124
 
 
125
-include depend