1 # Copyright (c) 2010 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 LDFLAGS = -lrt -ldl 6 7 LDFLAGS_UNITTEST = -lrt 8 9 LDFLAGS_HELPER = -lrt 10 11 SRC = media_v4l2_device.cc \ 12 media_v4l2_test.cc 13 14 SRC_UNITTEST = media_v4l2_device.cc \ 15 media_v4l2_unittest.cc 16 17 SRC_HELPER = media_v4l2_device.cc \ 18 media_v4l2_is_capture_device.cc 19 20 TARGET = ../media_v4l2_test 21 22 TARGET_UNITTEST = ../media_v4l2_unittest 23 24 TARGET_HELPER = ../media_v4l2_is_capture_device 25 26 all: $(TARGET) $(TARGET_UNITTEST) $(TARGET_HELPER) 27 28 $(TARGET): $(SRC) 29 $(CXX) $(CXXFLAGS) -O3 -o $@ $^ $(LDFLAGS) 30 31 $(TARGET_UNITTEST): $(SRC_UNITTEST) 32 $(CXX) $(CXXFLAGS) -O3 -o $@ $^ $(LDFLAGS_UNITTEST) 33 34 $(TARGET_HELPER): $(SRC_HELPER) 35 $(CXX) $(CXXFLAGS) -O3 -o $@ $^ $(LDFLAGS_HELPER) 36 37 clean: 38 $(RM) $(TARGET) 39 $(RM) $(TARGET_UNITTEST) 40 $(RM) $(TARGET_HELPER) 41