revived linux-glide build process
[mesa.git] / src / mesa / Makefile.solo
1 # Makefile for linux-solo (i.e. stand-alone DRI drivers for miniglx environment)
2 # We just generate a mesa.a file which is all the core Mesa sources. This will
3 # get linked into the DRI hardware drivers (name *_dri.so).
4
5
6 TOP = ../..
7
8 include sources
9
10 # The objects we want to make:
11 OBJECTS = \
12 $(CORE_OBJECTS)
13
14
15 ##### RULES #####
16
17 .c.o:
18 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
19
20 .S.o:
21 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
22
23
24 x86/matypes.h: main/mtypes.h tnl/t_context.h x86/gen_matypes.c
25 $(CC) $(INCLUDE_DIRS) $(CFLAGS) x86/gen_matypes.c -o x86/gen_matypes
26 ./x86/gen_matypes > x86/matypes.h
27 rm -f x86/gen_matypes x86/*.o
28
29 x86/common_x86_asm.o: x86/matypes.h
30
31
32
33 ##### TARGETS #####
34
35 default:
36 @echo "Specify a target configuration"
37
38
39 targets: mesa.a
40
41
42 # Make archive of core object files for linux-solo DRI drivers
43 mesa.a: $(OBJECTS)
44 rm -f $@
45 ar rcv $@ $(OBJECTS)
46 ranlib $@
47
48
49
50 # Run 'make -f Makefile.solo dep' to update the dependencies if you change
51 # what's included by any source file.
52 dep: $(CORE_SOURCES) $(ASM_SOURCES)
53 makedepend -fdepend -Y $(INCLUDE_DIRS) $(CORE_SOURCES) $(ASM_SOURCES)
54
55
56 # Emacs tags
57 tags:
58 etags `find . -name \*.[ch]` `find ../include`
59
60
61 # Remove .o and backup files
62 clean:
63 -rm -f *.a
64 -rm -f */*.o */*~ */*.o */*~
65 -rm -f drivers/*/*.o drivers/*/*/*.o
66
67
68 include $(TOP)/Make-config
69
70 include depend