2010-08-20 20:21:39 +03:00
|
|
|
#
|
|
|
|
# Makefile.common - Common rules and definitions for all the tools
|
|
|
|
#
|
|
|
|
# Written 2008 by Werner Almesberger
|
|
|
|
# Copyright 2008 Werner Almesberger
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2010-08-20 22:16:13 +03:00
|
|
|
INSTALL_PREFIX = /usr/local
|
2010-08-20 20:21:39 +03:00
|
|
|
|
2010-08-20 22:16:13 +03:00
|
|
|
CFLAGS = -Wall
|
|
|
|
LDFLAGS =
|
|
|
|
LDLIBS = -lusb
|
2010-08-20 20:21:39 +03:00
|
|
|
|
|
|
|
.PHONY: all install uninstall clean spotless
|
|
|
|
|
|
|
|
all: $(MAIN)
|
|
|
|
|
|
|
|
$(MAIN): $(MAIN).o $(OBJS)
|
2010-08-20 22:16:13 +03:00
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(MAIN).o $(OBJS) $(LDLIBS)
|
2010-08-20 20:21:39 +03:00
|
|
|
|
|
|
|
install: $(MAIN)
|
|
|
|
install $(MAIN) $(INSTALL_PREFIX)/bin/
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm -f $(INSTALL_PREFIX)/bin/$(MAIN)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(MAIN).o $(OBJS)
|
|
|
|
|
|
|
|
spotless: clean
|
|
|
|
rm -f $(MAIN)
|
|
|
|
|