make.patch
来自「seismic software,very useful」· PATCH 代码 · 共 36 行
PATCH
36 行
Some systems don't include the default rules for making libraries.This can be added to individual library makefiles as:.c.a: $(CC) -c $(CFLAGS) $< ar rv $@ $*.o rm -f $*.o.f.a: $(FC) -c $(FFLAGS) $< ar rv $@ $*.o rm -f $*.oSome systems don't recognize the built-in symbol, $$@, as in:prog : $$@.o cc $(CFLAGS) $@.o -o $@In this example it would be as easy to write:prog : prog.o cc $(CFLAGS) prog.o -o progBut the use of this in SU is to group a bunch of files that need thesame compilation into one rule:$(XM) : $$@.o cc $(CFLAGS) $@.o -lsu -lm -o $@If you don't have $$@, you'll have to write individual rules for eachmember of $(XM) and so forth. Sigh.Note: This stuff is well discussed in Kochan and Wood, "Topics in C Programming", Hayden, 1987.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?