+/EE312
software design
git clone https://git.julia.blue/+/EE312
6241299
master
1# New Makefile that automatically depends itself 2# 3# $Id: Makefile,v 1.3 1996/12/17 19:52:37 chase Exp $ 4# 5 6IFLAGS = 7DFLAGS = 8CXX = g++ --std=c++11 9#CXX = g++ --std=c++11 -m32 10CC = $( GCC ) 11#GCC = g++ --std=c++11 -m32 12GCC = g++ --std=c++11 13LD = $( CXX ) 14 15LIBS = 16 17WFLAGS = -Wall 18SYMFLAGS = -g 19 20PROFILE = #-pg 21OPTFLAGS = #-O 22CFLAGS = $( OPTFLAGS ) $( PROFILE ) $( WFLAGS ) $( IFLAGS ) $( SYMFLAGS ) 23CXXFLAGS = $( CFLAGS ) 24CPPFLAGS = $( IFLAGS ) $( DFLAGS ) 25LDFLAGS = $( PROFILE ) -g 26 27PROGRAM = proj7 28#CXXSRCS = Source.cpp 29 30CXXSRCS = $( shell ls *.cpp) 31 32 33SRCS = $( CXXSRCS ) 34 35OBJS = $( CXXSRCS:.cpp=.o) 36 37all : $( PROGRAM ) 38 39$( PROGRAM ): $( OBJS ) 40$( LD ) -o $ @ $( LDFLAGS ) $( OBJS ) $( LIBS ) 41 42test : $( PROGRAM ) 43./ $( PROGRAM ) 44 45clean : 46 -rm -f $( OBJS ) $( PROGRAM ) 47 48tidy : 49 -rm -f *.BAK *.bak *.CKP 50 51undepend : 52 -rm -f $( OBJS:%.o=.%.d ) 53 54spotless : tidy clean undepend 55 56.y.cpp : 57$( BISON ) $( BISONFLAGS ) -o $ @ $ < 58mv $ @ .h$ * .h 59mv $ @ .output$ * .output 60.l.cpp : 61$( FLEX ) ${ FLEXFLAGS } -t $ < > $ @ 62 63.cpp.s : 64$( CXX ) -S ${ SYMFLAGS } ${ OPTFLAGS } ${ IFLAGS } ${ DFLAGS } $ < 65 66# auto depend stuff for GNU make only 67depend : undepend 68@ echo "" 69@ echo "Dependences are handled automatically, just \"make\"" 70 71ifneq ($( strip $( CSRCS )) ,) 72.%.d : %.c 73$( SHELL ) -ec ' $( GCC ) -MM $( CPPFLAGS ) $ < > $ @' 74 75 76include$( CSRCS:%.c=.%.d) 77endif 78 79ifneq ($( strip $( CXXSRCS )) ,) 80.%.d : %.cpp 81$( SHELL ) -ec ' $( GCC ) -MM $( CPPFLAGS ) $ < > $ @' 82 83include$( CXXSRCS:%.cpp=.%.d) 84endif 85