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 5GRALLOCTEST = gralloctest 6SOURCES += gralloctest.c 7 8CCFLAGS += -g -O2 -Wall -fPIE 9LIBS += -lhardware -lsync -lcutils -pie 10 11OBJS = $(foreach source, $(SOURCES), $(addsuffix .o, $(basename $(source)))) 12 13OBJECTS = $(addprefix $(TARGET_DIR), $(notdir $(OBJS))) 14BINARY = $(addprefix $(TARGET_DIR), $(GRALLOCTEST)) 15 16.PHONY: all clean 17 18all: $(BINARY) 19 20$(BINARY): $(OBJECTS) 21 22clean: 23 $(RM) $(BINARY) 24 $(RM) $(OBJECTS) 25 26$(BINARY): 27 $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) 28 29$(TARGET_DIR)%.o: %.c 30 $(CC) $(CFLAGS) -c $^ -o $@ -MMD 31