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 5CFLAGS += -Wall -Werror 6 7# Support large files and major:minor numbers 8CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 9 10OUT = $(CURDIR) 11$(shell mkdir -p $(OUT)) 12 13all: $(OUT)/rootdev $(OUT)/librootdev.so.1.0 14 15$(OUT)/rootdev: main.c $(OUT)/librootdev.so.1.0 16 $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $^ -o $@ 17 18$(OUT)/librootdev.so.1.0: rootdev.c 19 $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fPIC \ 20 -Wl,-soname,librootdev.so.1 $< -o $@ 21 ln -s $(@F) $(OUT)/librootdev.so.1 22 ln -s $(@F) $(OUT)/librootdev.so 23 24clean: 25 rm -f $(OUT)/rootdev $(OUT)/librootdev.so* 26 27.PHONY: clean 28