makefile

来自「书名:C语言科学与艺术,以前交钱下载的」· 代码 · 共 82 行

TXT
82
字号
# Makefile for cslib/standard directory# Last modified on Thu Oct 20 13:49:04 1994 by eroberts#****************************************************************OBJECTS = \    genlib.o \    exception.o \    strlib.o \    simpio.o \    random.o \    graphics.oCSLIB = cslib.aCC = gccCFLAGS = -g -I. $(CCFLAGS)# ***************************************************************# Entry to bring the package up to date#    The "make all" entry should be the first real entryall: $(CSLIB) gccx# ***************************************************************# Standard entries to remove files from the directories#    tidy    -- eliminate unwanted files#    clean   -- delete derived files in preparation for rebuild#    scratch -- synonym for cleantidy:	rm -f ,* .,* *~ core a.out *.errclean scratch: tidy	rm -f *.o *.a gccx# ***************************************************************# C compilationsgenlib.o: genlib.c genlib.h exception.h gcalloc.h	$(CC) $(CFLAGS) -c genlib.cexception.o: exception.c exception.h genlib.h	$(CC) $(CFLAGS) -c exception.cstrlib.o: strlib.c strlib.h genlib.h	$(CC) $(CFLAGS) -c strlib.csimpio.o: simpio.c simpio.h strlib.h genlib.h	$(CC) $(CFLAGS) -c simpio.cgraphics.o: graphics.c graphics.h genlib.h	$(CC) $(CFLAGS) -c graphics.crandom.o: random.c random.h genlib.h	$(CC) $(CFLAGS) -c random.c# ***************************************************************# Entry to reconstruct the library archive$(CSLIB): $(OBJECTS)	-rm -f $(CSLIB)	ar cr $(CSLIB) $(OBJECTS)	ranlib $(CSLIB)# ***************************************************************# Entry to reconstruct the gccx scriptgccx: Makefile	@echo '#! /bin/csh -f' > gccx	@echo 'set INCLUDE =' `pwd` >> gccx	@echo 'set CSLIB = $$INCLUDE/cslib.a' >> gccx	@echo 'set LIBRARIES = ($$CSLIB -lm)' >> gccx	@echo 'foreach x ($$*)' >> gccx	@echo '  if ("x$$x" == "x-c") then' >> gccx	@echo '    set LIBRARIES = ""' >> gccx	@echo '    break' >> gccx	@echo '  endif' >> gccx	@echo 'end' >> gccx	@echo 'gcc -g -I$$INCLUDE $$* $$LIBRARIES' >> gccx	@chmod a+x gccx	@echo '[gccx script created]'

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?