blob: 38fef63651188a00eece10d12e06a93ed80c7860 [file] [log] [blame]
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
PKG_CONFIG ?= pkg-config
PKGS := gudev-1.0 glib-2.0
PKG_CFLAGS := $(shell ${PKG_CONFIG} --cflags $(PKGS))
PKG_LIBS := $(shell ${PKG_CONFIG} --libs $(PKGS))
WARN := -Werror -Wall
DEBUG := -g
OPT := -O2
all: gudev-exercise
.PHONY: clean all install
gudev-exercise: gudev-exercise.c
$(CC) -o $@ $(WARN) $(OPT) $(DEBUG) $(PKG_CFLAGS) $< $(PKG_LIBS) fakegudev.c
$(CC) -fPIC -shared -o $@ $(WARN) $(OPT) $(DEBUG) $(PKG_CFLAGS) $< -ldl
install -m 0755 -d $(DESTDIR)/lib
install -m 0755 $(DESTDIR)/lib
rm -f core gudev-exercise *.o *.so