glapi: Move to src/mapi/.
[mesa.git] / src / mapi / glapi / Makefile
1 # src/mapi/glapi/Makefile
2
3 TOP = ../../..
4 include $(TOP)/configs/current
5
6 include sources.mak
7 GLAPI_OBJECTS = $(GLAPI_SOURCES:.c=.o)
8 GLAPI_ASM_OBJECTS = $(GLAPI_ASM_SOURCES:.S=.o)
9
10 INCLUDE_DIRS = \
11 -I$(TOP)/include \
12 -I$(TOP)/src/mapi \
13 -I$(TOP)/src/mesa
14
15 default: depend libglapi.a
16
17 libglapi.a: $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS)
18 @ $(MKLIB) -o glapi -static $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS)
19
20 $(GLAPI_OBJECTS): %.o: %.c
21 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
22
23 $(GLAPI_ASM_OBJECTS): %.o: %.S
24 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
25
26 install:
27
28 clean:
29 -rm -f $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS)
30 -rm -f depend depend.bak libglapi.a
31
32 depend: $(GLAPI_SOURCES)
33 @ echo "running $(MKDEP)"
34 @ touch depend
35 @$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(GLAPI_SOURCES) \
36 > /dev/null 2>/dev/null
37
38 -include depend