r300g: add generating texture coordinates for point sprites
[mesa.git] / src / glw / Makefile
1 # src/glw/Makefile
2
3 TOP = ../..
4 include $(TOP)/configs/current
5
6 MAJOR = 1
7 MINOR = 0
8 TINY = 0
9
10 INCDIRS = -I$(TOP)/include $(MOTIF_CFLAGS) $(X11_INCLUDES)
11
12
13 OBJECTS = $(GLW_SOURCES:.c=.o)
14
15
16
17 ##### RULES #####
18
19 .c.o:
20 $(CC) -c $(INCDIRS) $(CFLAGS) $<
21
22
23
24 ##### TARGETS #####
25
26 default: $(TOP)/$(LIB_DIR)/$(GLW_LIB_NAME)
27
28 # GLU pkg-config file
29 pcedit = sed \
30 -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
31 -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
32 -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
33 -e 's,@VERSION@,$(MAJOR).$(MINOR).$(TINY),' \
34 -e 's,@GLW_PC_REQ_PRIV@,$(GLW_PC_REQ_PRIV),' \
35 -e 's,@GLW_PC_LIB_PRIV@,$(GLW_PC_LIB_PRIV),' \
36 -e 's,@GLW_PC_CFLAGS@,$(GLW_PC_CFLAGS),' \
37 -e 's,@GLW_LIB@,$(GLW_LIB),'
38 glw.pc: glw.pc.in
39 $(pcedit) $< > $@
40
41 install: glw.pc
42 $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL
43 $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
44 $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
45 $(INSTALL) -m 644 *.h $(DESTDIR)$(INSTALL_INC_DIR)/GL
46 $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GLW_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
47 $(INSTALL) -m 644 glw.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
48
49 clean:
50 -rm -f depend depend.bak
51 -rm -f *.o *.pc *~
52
53
54 # Make the library
55 $(TOP)/$(LIB_DIR)/$(GLW_LIB_NAME): $(OBJECTS)
56 $(MKLIB) -o $(GLW_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
57 -major $(MAJOR) -minor $(MINOR) -patch $(TINY) \
58 $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
59 -id $(INSTALL_LIB_DIR)/lib$(GLW_LIB).$(MAJOR).dylib \
60 $(GLW_LIB_DEPS) $(OBJECTS)
61
62
63 #
64 # Run 'make depend' to update the dependencies if you change what's included
65 # by any source file.
66 #
67 depend: $(GLW_SOURCES)
68 rm -f depend
69 touch depend
70 $(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(GLW_SOURCES) \
71 $(X11_INCLUDES) > /dev/null
72
73
74 include depend