SHELL=/bin/sh # This file contains a set of rules used by the "make" # command. This makefile $(MAKEFILE) tells "make" how the # executable area $(COMMAND) should be created # from the source files $(SRCS) via the object # files $(OBJS) and the header files $(HDRS); type the command: # "make -f make_program" # where make_program should be replaced by the name of # the makefile. # # This file also tells make what to do if arguments # follow the "make" command. # # To remove the OBJS files; type the command: # "make -f make_program clean" # # To create a gzipped tar file with name $(COMMAND).tar.gz # containing this makefile and the SRCS files, # type the command: # "make -f make_program tarz" SRCS= \ area.c OBJS= \ area.o HDRS= \ MAKEFILE= make_area COMMAND= area CC= gcc CFLAGS= -g WARNFLAGS= -ansi -pedantic -Werror -Wall -W \ -Wmissing-prototypes -Wstrict-prototypes -Wtraditional \ -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align \ -Wwrite-strings -fno-common -Wnested-externs LDFLAGS= -lgsl -lgslcblas -lm $(COMMAND): $(OBJS) $(CC) -o $(COMMAND) $(OBJS) $(LDFLAGS) $(LIBS) area.o : area.c $(CC) $(CFLAGS) $(WARNFLAGS) -c area.c -o area.o clean: rm -f $(OBJS) tarz: tar zcf - $(MAKEFILE) $(SRCS) $(HDRS) > $(COMMAND).tar.gz