📄 makefile
字号:
## @(#)Makefile 1.1 92/07/30 SMI#.KEEP_STATE:DESTDIR =INSDIR = $(DESTDIR)/usr/demo/SOUNDMANDIR = $(INSDIR)/man3LIBRARY = libaudio.aLINTLIB = llib-llibaudio.ln.PRECIOUS: $(LIBRARY)# source files in this directoryLIBSRCS = filehdr.c device_ctl.c hdr_misc.c ulaw2linear.cLIBHDRS = libaudio_impl.hLIBMANS = audio_intro.3 audio_hdr.3 audio_filehdr.3 audio_misc.3 \ audio_device.3 audio_convert.3 audio_ulaw2linear.3# 'make install' targetsINSFILES = $(MANDIR) $(LIBMANS:%=$(MANDIR)/%) $(LINTLIB:%=$(INSDIR)/%)# default rule builds the libraryall default: $(LIBHDRS) $(LIBRARY)# install man pages and lint library onlyinstall: $(INSFILES) $(LINTLIB)# rules to build the libraryINCLUDE =CPPFLAGS = -I. -I../multimedia $(INCLUDE)CFLAGS = -OLIBOBJS = $(LIBSRCS:%.c=%.o)$(LIBRARY): $$@($(LIBOBJS)) $(AR) rc $@ $? ranlib $@ $(RM) $?# this rule is necessary because the default library rules are broken.c.a: $(COMPILE.c) -o $% $<# rules to build the lint librarylint: $(LINTLIB)LIBLINTS = $(LIBSRCS:%.c=%.ln)$(LINTLIB): $(LIBHDRS) $(LIBSRCS) @$(MAKE) $(MFLAGS) $(LIBLINTS) INCLUDE=$(INCLUDE) @cat $(LIBLINTS) > $@ @echo Lint pass 2: @$(LINT.c) -u $@ @$(RM) $(LIBLINTS)# ulaw2linear.c is a file derived algorithmicallyulaw2linear.c: gen_ulaw2linear gen_ulaw2linear > $@# rules for testing the conversion macros and tablesTESTSRC = test_ulaw2linear.c test_dbl2int.cTESTS = $(TESTSRC:%.c=%)$(TESTS) := LDLIBS = $(LIBRARY) -lmtest: $(LIBRARY) $(TESTS) @for i in $(TESTS); do \ $$i; \ done# rules for installing files from this directoryOWNER = binINSTALL = install -o $(OWNER)$(INSDIR)/%: % $(INSTALL) -m 644 $< $(INSDIR)$(MANDIR)/%: % $(INSTALL) -m 644 $< $(MANDIR)# rule to ensure target directories exist$(INSDIR) $(MANDIR): ?$(INSTALL) -d -m 755 $@clean: $(RM) $(LIBRARY) $(TESTS) gen_ulaw2linear ulaw2linear.c *.o *.ln
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -