Home | History | Annotate | Download | only in src
      1 # Copyright 2016 The Chromium OS Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 GRALLOCTEST = gralloctest
      6 SOURCES += gralloctest.c
      7 
      8 OBJS = $(SOURCES:.c=.o)
      9 DEPS = $(SOURCES:.c=.d)
     10 
     11 CCFLAGS += -g -O2 -Wall -fPIE
     12 LIBS    += -lhardware -lsync -lcutils -pie
     13 
     14 .PHONY: all clean
     15 
     16 all: $(GRALLOCTEST)
     17 
     18 $(GRALLOCTEST): $(OBJS)
     19 
     20 clean:
     21 	$(RM) $(GRALLOCTEST)
     22 	$(RM) $(OBJS) $(DEPS)
     23 	$(RM) *.o *.d .version
     24 
     25 $(GRALLOCTEST):
     26 	$(CC) $(CCFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
     27 
     28 $(OBJS): %.o: %.c
     29 	$(CC) $(CCFLAGS) -c $^ -o $@ -MMD
     30 
     31 -include $(DEPS)
     32