Fix the library name in glw.pc
[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 -I/usr/include/Motif1.2 $(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,@LIB_DIR@,$(LIB_DIR),' \
32 -e 's,@VERSION@,$(MAJOR).$(MINOR).$(TINY),'
33 glw.pc: glw.pc.in
34 $(pcedit) $< > $@
35
36 install: glw.pc
37 $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
38 $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
39 $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
40 $(INSTALL) -m 644 *.h $(DESTDIR)$(INSTALL_DIR)/include/GL
41 $(INSTALL) $(TOP)/$(LIB_DIR)/libGLw.* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
42 $(INSTALL) -m 644 glw.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
43
44 clean:
45 -rm depend depend.bak
46 -rm -f *.o *~
47
48
49 # Make the library
50 $(TOP)/$(LIB_DIR)/$(GLW_LIB_NAME): $(OBJECTS)
51 $(TOP)/bin/mklib -o $(GLW_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
52 -major $(MAJOR) -minor $(MINOR) -patch $(TINY) \
53 $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
54 $(GLW_LIB_DEPS) $(OBJECTS)
55
56
57 #
58 # Run 'make depend' to update the dependencies if you change what's included
59 # by any source file.
60 #
61 depend: $(GLW_SOURCES)
62 touch depend
63 $(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(GLW_SOURCES) \
64 > /dev/null
65
66
67 include depend