Improve the behaviour of the build system wrt depend files.
[profile/ivi/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_fullscrn.c \
40         glut_gamemode.c \
41         glut_get.c \
42         glut_glxext.c \
43         glut_hel10.c \
44         glut_hel12.c \
45         glut_hel18.c \
46         glut_init.c \
47         glut_input.c \
48         glut_joy.c \
49         glut_key.c \
50         glut_keyctrl.c \
51         glut_keyup.c \
52         glut_menu.c \
53         glut_menu2.c \
54         glut_mesa.c \
55         glut_modifier.c \
56         glut_mroman.c \
57         glut_overlay.c \
58         glut_roman.c \
59         glut_shapes.c \
60         glut_space.c \
61         glut_stroke.c \
62         glut_swap.c \
63         glut_swidth.c \
64         glut_tablet.c \
65         glut_teapot.c \
66         glut_tr10.c \
67         glut_tr24.c \
68         glut_util.c \
69         glut_vidresize.c \
70         glut_warp.c \
71         glut_win.c \
72         glut_winmisc.c \
73         layerutil.c
74
75
76 OBJECTS = $(SOURCES:.c=.o)
77
78
79 ##### RULES #####
80
81 .c.o:
82         $(CC) -c -I$(TOP)/include $(CFLAGS) $(GLUT_CFLAGS) $<
83
84
85
86 ##### TARGETS #####
87
88 default: $(LIB_DIR)/$(GLUT_LIB_NAME)
89
90
91 # Make the library
92 $(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
93         CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GLUT_LIB) \
94                 -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \
95                 -patch $(GLUT_TINY) $(MKLIB_OPTIONS) -install $(LIB_DIR) \
96                 $(GLUT_LIB_DEPS) $(OBJECTS)
97
98
99 clean:
100         -rm -f *.o *~
101         -rm -f *.lo
102         -rm -f *.la
103         -rm -rf .libs
104
105
106 depend: $(SOURCES)
107         @ echo "running $(MKDEP)"
108         @ touch depend
109         @ $(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(SOURCES) \
110                 > /dev/null 
111
112 include depend