bf93d63e305a99c83cfe97859d00b39ca2d7222d
[mesa.git] / src / glut / directfb / Makefile
1 # subset glut
2
3 TOP = ../../..
4 include $(TOP)/configs/current
5
6 MARK = $(TOP)/src/glut/glx
7
8 GLUT_MAJOR = 3
9 GLUT_MINOR = 7
10 GLUT_TINY = 1
11
12 INCLUDES = -I$(TOP)/include -I$(MARK) $(shell pkg-config --cflags directfb)
13
14 GLUT_LIB_DEPS += $(shell pkg-config --libs directfb)
15
16 CORE_SOURCES = \
17 callback.c \
18 color.c \
19 cursor.c \
20 ext.c \
21 events.c \
22 font.c \
23 game.c \
24 globals.c \
25 init.c \
26 menu.c \
27 models.c \
28 overlay.c \
29 state.c \
30 teapot.c \
31 window.c \
32
33
34 MARK_SOURCES = \
35 $(MARK)/glut_8x13.c \
36 $(MARK)/glut_9x15.c \
37 $(MARK)/glut_hel10.c \
38 $(MARK)/glut_hel12.c \
39 $(MARK)/glut_hel18.c \
40 $(MARK)/glut_tr10.c \
41 $(MARK)/glut_tr24.c
42
43 SOURCES = $(CORE_SOURCES) $(MARK_SOURCES)
44
45 OBJECTS = $(SOURCES:.c=.o)
46
47
48 ##### RULES #####
49
50 .c.o:
51 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
52
53 .S.o:
54 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
55
56
57 ##### TARGETS #####
58
59 default: depend $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
60
61
62 # Make the library
63 $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
64 $(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
65 -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
66 $(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
67 $(MKLIB_OPTIONS) $(OBJECTS)
68
69
70 # Run 'make -f Makefile.solo dep' to update the dependencies if you change
71 # what's included by any source file.
72 depend: $(SOURCES)
73 rm -f depend
74 touch depend
75 $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null
76
77 # Emacs tags
78 tags:
79 etags `find . -name \*.[ch]` `find ../include`
80
81
82 # Remove .o and backup files
83 clean: depend
84 -rm -f depend depend.bak
85 -rm -f *.o *~ *.o *~ *.so libglut.so.3.7
86
87 include depend