Makefile revision 202
12Ssraasch@umich.edu# Copyright (c) 2003 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.edu# $Id$ 302Ssraasch@umich.edu 312Ssraasch@umich.eduCC= gcc 322Ssraasch@umich.eduCXX= g++ 332Ssraasch@umich.edu 342Ssraasch@umich.eduCURDIR?= $(shell /bin/pwd) 352Ssraasch@umich.eduSRCDIR?= . 36202Sbinkertn@umich.eduM5_SRCDIR?= $(SRCDIR)/../.. 372Ssraasch@umich.edu 38202Sbinkertn@umich.eduvpath % $(M5_SRCDIR)/base 39202Sbinkertn@umich.eduvpath % $(M5_SRCDIR)/sim 402Ssraasch@umich.edu 41202Sbinkertn@umich.eduINCLDIRS= -I. -I$(M5_SRCDIR) -I- -I/usr/local/include 422Ssraasch@umich.eduCCFLAGS= -g -O0 -MMD $(INCLDIRS) 432Ssraasch@umich.edu 442Ssraasch@umich.edudefault: m5tap 452Ssraasch@umich.edu 462Ssraasch@umich.edum5tap: tap.o cprintf.o 472Ssraasch@umich.edu $(CXX) $(LFLAGS) -o $@ $^ -lpcap -L/usr/local/lib -ldnet 482Ssraasch@umich.edu 49202Sbinkertn@umich.eduinstall: m5tap 50202Sbinkertn@umich.edu $(SUDO) install -o root -m 555 m5tap /usr/local/bin 512Ssraasch@umich.edu 522Ssraasch@umich.educlean: 532Ssraasch@umich.edu @rm -f m5tap *.o *.d *~ .#* 542Ssraasch@umich.edu 552Ssraasch@umich.edu.PHONY: clean 562Ssraasch@umich.edu 572Ssraasch@umich.edu# C++ Compilation 582Ssraasch@umich.edu%.o: %.cc 592Ssraasch@umich.edu @echo '$(CXX) $(CCFLAGS) -c $(notdir $<) -o $@' 602Ssraasch@umich.edu @$(CXX) $(CCFLAGS) -c $< -o $@ 612Ssraasch@umich.edu 622Ssraasch@umich.edu# C Compilation 632Ssraasch@umich.edu%.o: %.c 642Ssraasch@umich.edu @echo '$(CC) $(CCFLAGS) -c $(notdir $<) -o $@' 652Ssraasch@umich.edu @$(CC) $(CCFLAGS) -c $< -o $@ 662Ssraasch@umich.edu 672Ssraasch@umich.edu-include *.d 68