Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 1 | TOP = ../../.. |
2 | include $(TOP)/configs/current | ||||
3 | |||||
Brian Paul | 0e794a1 | 2006-06-22 22:50:48 +0000 | [diff] [blame] | 4 | EXTRA_DEFINES = -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER \ |
Brian Paul | 883f989 | 2006-07-13 02:50:27 +0000 | [diff] [blame] | 5 | -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 6 | |
Brian Paul | 28569c2 | 2005-09-12 15:19:19 +0000 | [diff] [blame] | 7 | SOURCES = \ |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 8 | glcontextmodes.c \ |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 9 | clientattrib.c \ |
10 | compsize.c \ | ||||
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 11 | eval.c \ |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 12 | glxcmds.c \ |
George Sapountzis | df04ffb | 2008-04-18 17:28:34 +0300 | [diff] [blame] | 13 | glxcurrent.c \ |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 14 | glxext.c \ |
15 | glxextensions.c \ | ||||
Ian Romanick | 0d84c68 | 2004-12-20 04:53:00 +0000 | [diff] [blame] | 16 | indirect.c \ |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 17 | indirect_init.c \ |
Ian Romanick | 9bba1cf | 2004-12-01 09:11:04 +0000 | [diff] [blame] | 18 | indirect_size.c \ |
Ian Romanick | 6b89a83 | 2004-12-01 08:31:15 +0000 | [diff] [blame] | 19 | indirect_window_pos.c \ |
George Sapountzis | f027f8d | 2008-04-18 17:28:53 +0300 | [diff] [blame] | 20 | indirect_texture_compression.c \ |
Ian Romanick | bb427b1 | 2004-12-01 08:22:44 +0000 | [diff] [blame] | 21 | indirect_transpose_matrix.c \ |
Ian Romanick | 57b5e85 | 2005-02-23 00:24:18 +0000 | [diff] [blame] | 22 | indirect_vertex_array.c \ |
Ian Romanick | 40af76b | 2005-02-25 22:46:30 +0000 | [diff] [blame] | 23 | indirect_vertex_program.c \ |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 24 | pixel.c \ |
25 | pixelstore.c \ | ||||
26 | render2.c \ | ||||
27 | renderpix.c \ | ||||
28 | single2.c \ | ||||
29 | singlepix.c \ | ||||
30 | vertarr.c \ | ||||
31 | xfont.c \ | ||||
32 | glx_pbuffer.c \ | ||||
33 | glx_query.c \ | ||||
George Sapountzis | 1087cc6 | 2008-06-13 15:54:08 +0300 | [diff] [blame] | 34 | drisw_glx.c \ |
George Sapountzis | 0793457 | 2008-06-09 17:47:09 +0300 | [diff] [blame] | 35 | dri_common.c \ |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 36 | dri_glx.c \ |
Kristian Høgsberg | 4ceefcc | 2007-04-29 15:05:02 -0400 | [diff] [blame] | 37 | XF86dri.c \ |
Kristian Høgsberg | e82dd8c | 2008-03-26 19:26:59 -0400 | [diff] [blame] | 38 | glxhash.c \ |
39 | dri2_glx.c \ | ||||
40 | dri2.c | ||||
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 41 | |
Zack Rusin | d8be393 | 2008-08-13 07:14:47 -0400 | [diff] [blame] | 42 | include $(TOP)/src/mesa/sources.mak |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 43 | |
Alan Hourihane | 6f7ed99 | 2008-06-12 00:11:54 +0100 | [diff] [blame] | 44 | MESA_GLAPI_ASM_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_ASM_SOURCES)) |
Brian Paul | 28569c2 | 2005-09-12 15:19:19 +0000 | [diff] [blame] | 45 | MESA_GLAPI_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_SOURCES)) |
46 | MESA_GLAPI_OBJECTS = $(addprefix $(TOP)/src/mesa/, $(GLAPI_OBJECTS)) | ||||
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 47 | |
Brian Paul | 28569c2 | 2005-09-12 15:19:19 +0000 | [diff] [blame] | 48 | OBJECTS = $(SOURCES:.c=.o) $(MESA_GLAPI_OBJECTS) |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 49 | |
Keith Whitwell | fc23672 | 2004-12-08 15:16:36 +0000 | [diff] [blame] | 50 | INCLUDES = -I. \ |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 51 | -I$(TOP)/include \ |
52 | -I$(TOP)/include/GL/internal \ | ||||
José Fonseca | eaa82d3 | 2007-12-12 16:04:58 +0000 | [diff] [blame] | 53 | -I$(TOP)/src/mesa \ |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 54 | -I$(TOP)/src/mesa/glapi \ |
Adam Jackson | be85fde | 2006-08-10 20:19:57 +0000 | [diff] [blame] | 55 | $(LIBDRM_CFLAGS) \ |
Kristian Høgsberg | e82dd8c | 2008-03-26 19:26:59 -0400 | [diff] [blame] | 56 | $(DRI2PROTO_CFLAGS) \ |
Keith Whitwell | fc23672 | 2004-12-08 15:16:36 +0000 | [diff] [blame] | 57 | $(X11_INCLUDES) |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 58 | |
59 | |||||
60 | ##### RULES ##### | ||||
61 | |||||
62 | .c.o: | ||||
Brian Paul | 0d57301 | 2006-03-09 16:24:46 +0000 | [diff] [blame] | 63 | $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@ |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 64 | |
65 | .S.o: | ||||
Brian Paul | 0d57301 | 2006-03-09 16:24:46 +0000 | [diff] [blame] | 66 | $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@ |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 67 | |
68 | ##### TARGETS ##### | ||||
69 | |||||
Brian Paul | 883f989 | 2006-07-13 02:50:27 +0000 | [diff] [blame] | 70 | default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 71 | |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 72 | # Make libGL |
Brian Paul | 883f989 | 2006-07-13 02:50:27 +0000 | [diff] [blame] | 73 | $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile |
Dan Nicholson | db072ba | 2008-07-11 13:54:48 -0700 | [diff] [blame] | 74 | $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \ |
Brian Paul | 8dcc673 | 2005-07-25 22:59:58 +0000 | [diff] [blame] | 75 | -major 1 -minor 2 $(MKLIB_OPTIONS) \ |
Jeremy Huddleston | 98e7c1c | 2008-08-12 10:59:40 -0700 | [diff] [blame] | 76 | -install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/lib$(GL_LIB).1.dylib \ |
Jeremy Huddleston | ac0d196 | 2008-08-11 09:17:06 -0700 | [diff] [blame] | 77 | $(GL_LIB_DEPS) $(OBJECTS) |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 78 | |
79 | |||||
Alan Hourihane | 6f7ed99 | 2008-06-12 00:11:54 +0100 | [diff] [blame] | 80 | depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES) Makefile |
81 | rm -f depend | ||||
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 82 | touch depend |
Brian Paul | 28569c2 | 2005-09-12 15:19:19 +0000 | [diff] [blame] | 83 | $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) \ |
Alan Hourihane | 6f7ed99 | 2008-06-12 00:11:54 +0100 | [diff] [blame] | 84 | $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES) |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 85 | |
86 | |||||
87 | # Emacs tags | ||||
88 | tags: | ||||
Brian | 4647f13 | 2007-04-07 19:36:58 -0600 | [diff] [blame] | 89 | etags `find . -name \*.[ch]` `find $(TOP)/include` |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 90 | |
Kristian Høgsberg | fe23dc5 | 2008-03-10 18:43:53 -0400 | [diff] [blame] | 91 | install: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) |
Brian Paul | 5429d4a | 2008-05-28 08:53:32 -0600 | [diff] [blame] | 92 | $(MAKE) -C $(TOP)/src/mesa install-libgl |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 93 | |
94 | # Remove .o and backup files | ||||
95 | clean: | ||||
Brian Paul | 883f989 | 2006-07-13 02:50:27 +0000 | [diff] [blame] | 96 | -rm -f $(TOP)/$(LIB_DIR)/libGL.so* |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 97 | -rm -f *.o *~ |
Dan Nicholson | c5e2b85 | 2008-05-06 14:00:43 -0700 | [diff] [blame] | 98 | -rm -f depend depend.bak |
Adam Jackson | cb3610e | 2004-10-25 21:09:16 +0000 | [diff] [blame] | 99 | |
Kristian Høgsberg | bcecea6 | 2008-02-25 18:50:26 -0500 | [diff] [blame] | 100 | -include depend |