Makefile revision 12053
11760Sstever@eecs.umich.edu# Copyright (c) 2003, 2005 The Regents of The University of Michigan
22Ssraasch@umich.edu# All rights reserved.
32Ssraasch@umich.edu#
42Ssraasch@umich.edu# Redistribution and use in source and binary forms, with or without
52Ssraasch@umich.edu# modification, are permitted provided that the following conditions are
62Ssraasch@umich.edu# met: redistributions of source code must retain the above copyright
72Ssraasch@umich.edu# notice, this list of conditions and the following disclaimer;
82Ssraasch@umich.edu# redistributions in binary form must reproduce the above copyright
92Ssraasch@umich.edu# notice, this list of conditions and the following disclaimer in the
102Ssraasch@umich.edu# documentation and/or other materials provided with the distribution;
112Ssraasch@umich.edu# neither the name of the copyright holders nor the names of its
122Ssraasch@umich.edu# contributors may be used to endorse or promote products derived from
132Ssraasch@umich.edu# this software without specific prior written permission.
142Ssraasch@umich.edu#
152Ssraasch@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
162Ssraasch@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
172Ssraasch@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
182Ssraasch@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
192Ssraasch@umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
202Ssraasch@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
212Ssraasch@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
222Ssraasch@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
232Ssraasch@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
242Ssraasch@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
252Ssraasch@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
262Ssraasch@umich.edu#
272Ssraasch@umich.edu# Authors: Nathan Binkert
282Ssraasch@umich.edu
292Ssraasch@umich.eduCC= gcc
302Ssraasch@umich.eduCXX= g++
312Ssraasch@umich.edu
3212053Sgabeblack@google.comINCLDIRS= -iquote . -I /usr/local/include
3312053Sgabeblack@google.comCCFLAGS= -g -MMD $(INCLDIRS)
342Ssraasch@umich.edu
352Ssraasch@umich.edudefault: m5tap
362Ssraasch@umich.edu
3712053Sgabeblack@google.comm5tap: tap.o
3812053Sgabeblack@google.com	$(CXX) $(LFLAGS) -o $@ $^ -lpcap
392Ssraasch@umich.edu
40202Sbinkertn@umich.eduinstall: m5tap
41202Sbinkertn@umich.edu	$(SUDO) install -o root -m 555 m5tap /usr/local/bin
422Ssraasch@umich.edu
432Ssraasch@umich.educlean:
442Ssraasch@umich.edu	@rm -f m5tap *.o *.d *~ .#*
452Ssraasch@umich.edu
462Ssraasch@umich.edu.PHONY: clean
472Ssraasch@umich.edu
482Ssraasch@umich.edu# C++ Compilation
492Ssraasch@umich.edu%.o: %.cc
502Ssraasch@umich.edu	@echo '$(CXX) $(CCFLAGS) -c $(notdir $<) -o $@'
512Ssraasch@umich.edu	@$(CXX) $(CCFLAGS) -c $< -o $@
522Ssraasch@umich.edu
532Ssraasch@umich.edu# C Compilation
542Ssraasch@umich.edu%.o: %.c
552Ssraasch@umich.edu	@echo '$(CC) $(CCFLAGS) -c $(notdir $<) -o $@'
562Ssraasch@umich.edu	@$(CC) $(CCFLAGS) -c $< -o $@
572Ssraasch@umich.edu
582Ssraasch@umich.edu-include *.d
59