Make sure mklib sees the definition of CC and CXX. Make mklib respect
[mesa.git] / src / glut / glx / Makefile
1 # Makefile for GLUT
2 #
3 # NOTICE: The OpenGL Utility Toolkit (GLUT) distribution contains source
4 # code published in a book titled "Programming OpenGL for the X Window
5 # System" (ISBN: 0-201-48359-9) published by Addison-Wesley. The
6 # programs and associated files contained in the distribution were
7 # developed by Mark J. Kilgard and are Copyright 1994, 1995, 1996 by Mark
8 # J. Kilgard (unless otherwise noted). The programs are not in the
9 # public domain, but they are freely distributable without licensing
10 # fees. These programs are provided without guarantee or warrantee
11 # expressed or implied.
12 #
13 # GLUT source included with Mesa with permission from Mark Kilgard.
14
15
16 TOP = ../../..
17
18 include $(TOP)/configs/current
19
20
21 ##### MACROS #####
22
23 GLUT_MAJOR = 3
24 GLUT_MINOR = 7
25 GLUT_TINY = 1
26
27 SOURCES = \
28 glut_8x13.c \
29 glut_9x15.c \
30 glut_bitmap.c \
31 glut_bwidth.c \
32 glut_cindex.c \
33 glut_cmap.c \
34 glut_cursor.c \
35 glut_dials.c \
36 glut_dstr.c \
37 glut_event.c \
38 glut_ext.c \
39 glut_fbc.c \
40 glut_fullscrn.c \
41 glut_gamemode.c \
42 glut_get.c \
43 glut_glxext.c \
44 glut_hel10.c \
45 glut_hel12.c \
46 glut_hel18.c \
47 glut_init.c \
48 glut_input.c \
49 glut_joy.c \
50 glut_key.c \
51 glut_keyctrl.c \
52 glut_keyup.c \
53 glut_menu.c \
54 glut_menu2.c \
55 glut_mesa.c \
56 glut_modifier.c \
57 glut_mroman.c \
58 glut_overlay.c \
59 glut_roman.c \
60 glut_shapes.c \
61 glut_space.c \
62 glut_stroke.c \
63 glut_swap.c \
64 glut_swidth.c \
65 glut_tablet.c \
66 glut_teapot.c \
67 glut_tr10.c \
68 glut_tr24.c \
69 glut_util.c \
70 glut_vidresize.c \
71 glut_warp.c \
72 glut_win.c \
73 glut_winmisc.c \
74 layerutil.c
75
76
77 OBJECTS = $(SOURCES:.c=.o)
78
79
80 ##### RULES #####
81
82 .c.o:
83 $(CC) -c -I$(TOP)/include $(CFLAGS) $(GLUT_CFLAGS) $<
84
85
86
87 ##### TARGETS #####
88
89 default: $(LIB_DIR)/$(GLUT_LIB_NAME)
90
91
92 # Make the library
93 $(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
94 CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GLUT_LIB) \
95 -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \
96 -patch $(GLUT_TINY) $(MKLIB_OPTIONS) -install $(LIB_DIR) \
97 $(GLUT_LIB_DEPS) $(OBJECTS)
98
99
100 clean:
101 -rm -f *.o *~
102 -rm -f *.lo
103 -rm -f *.la
104 -rm -rf .libs
105
106
107 depend: $(SOURCES)
108 touch depend
109 $(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(SOURCES)
110
111 include depend