+/EE312
software design
git clone https://git.julia.blue/+/EE312
0c27270
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++ 9CC = $( GCC ) 10GCC = g++ 11LD = $( CXX ) 12 13LIBS = 14 15WFLAGS = -Wall 16SYMFLAGS = -g 17 18PROFILE = #-pg 19OPTFLAGS = #-O 20CFLAGS = $( OPTFLAGS ) $( PROFILE ) $( WFLAGS ) $( IFLAGS ) $( SYMFLAGS ) 21CXXFLAGS = $( CFLAGS ) 22CPPFLAGS = $( IFLAGS ) $( DFLAGS ) 23LDFLAGS = $( PROFILE ) -g 24 25PROGRAM = proj4 26#CXXSRCS = Source.cpp 27 28CXXSRCS = $( shell ls *.cpp) 29 30SRCS = $( CXXSRCS ) 31 32OBJS = $( CXXSRCS:.cpp=.o) 33 34all : $( PROGRAM ) 35 36$( PROGRAM ): $( OBJS ) 37$( LD ) -o $ @ $( LDFLAGS ) $( OBJS ) $( LIBS ) 38 39test : $( PROGRAM ) 40./ $( PROGRAM ) 41 42clean : 43 -rm -f $( OBJS ) $( PROGRAM ) 44 45tidy : 46 -rm -f *.BAK *.bak *.CKP 47 48undepend : 49 -rm -f $( OBJS:%.o=.%.d ) 50 51spotless : tidy clean undepend 52 53# auto depend stuff for GNU make only 54depend : undepend 55@ echo "" 56@ echo "Dependences are handled automatically, just \"make\"" 57 58ifneq ($( strip $( CSRCS )) ,) 59.%.d : %.c 60$( SHELL ) -ec ' $( GCC ) -MM $( CPPFLAGS ) $ < > $ @' 61 62 63include$( CSRCS:%.c=.%.d) 64endif 65 66ifneq ($( strip $( CXXSRCS )) ,) 67.%.d : %.cpp 68$( SHELL ) -ec ' $( GCC ) -MM $( CPPFLAGS ) $ < > $ @' 69 70include$( CXXSRCS:%.cpp=.%.d) 71endif 72