summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/gbm/Makefile
blob: 1d96eb2032d0e31f0e82c2be0d1f45d52dfd1a82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
TOP = ../../../..
include $(TOP)/configs/current

gbm_INCLUDES = \
	-I. \
	-I$(TOP)/src/gallium/include \
	-I$(TOP)/src/gallium/auxiliary \
	-I$(TOP)/src/gbm/main \
	-I$(TOP)/include

gbm_SOURCES = $(wildcard *.c)
gbm_OBJECTS = $(gbm_SOURCES:.c=.o)

ALL_INCLUDES = $(gbm_INCLUDES)
ALL_SOURCES = $(gbm_SOURCES)

GBM_OBJECTS = $(gbm_OBJECTS)
GBM_CPPFLAGS = $(gbm_INCLUDES)

##### TARGETS #####

default: depend libgbm.a

libgbm.a: $(GBM_OBJECTS) Makefile
	$(MKLIB) -o gbm -static $(GBM_OBJECTS)

depend: 
	rm -f depend
	touch depend
	$(MKDEP) $(MKDEP_OPTIONS) $(ALL_INCLUDES) $(ALL_SOURCES) 2> /dev/null

clean:
	rm -f libgbm.a
	rm -f $(GBM_OBJECTS)
	rm -f depend depend.bak

# Dummy target
install:
	@echo -n ""

##### RULES #####

$(gbm_OBJECTS): %.o: %.c
	$(CC) -c $(GBM_CPPFLAGS) $(DEFINES) $(CFLAGS) $< -o $@

sinclude depend