# Makefile for Program-Library-HOWTO # Note: You have to MANUALLY include demo.sgml # into "Program-Library-HOWTO.sgml". # Before distributing, do a "make && make clean", then post to my website. # To send to Linux Documentation Project: # Email submit@en.tldp.org # (was submit@linuxdoc.org) # Attach Program-Library-HOWTO.sgml.gz # Be sure to include the name of your HOWTO in the subject line, # and use the body to outline changes you've made and attach your HOWTO. all: demo_programs docs demo.sgml libdemos.tar.gz docs: Program-Library-HOWTO.ps Program-Library-HOWTO.pdf \ Program-Library-HOWTO/index.html Program-Library-HOWTO.rtf \ Program-Library-HOWTO.txt Program-Library-HOWTO.sgml.gz Program-Library-HOWTO.ps: Program-Library-HOWTO.sgml db2ps Program-Library-HOWTO.sgml chmod a+r Program-Library-HOWTO.ps Program-Library-HOWTO.pdf: Program-Library-HOWTO.ps db2pdf Program-Library-HOWTO.sgml chmod a+r Program-Library-HOWTO.pdf # The following creates Type 3 fonts, which some readers can't handle: # ps2pdf Program-Library-HOWTO.ps Program-Library-HOWTO.pdf # Generate HTML: Program-Library-HOWTO/index.html: Program-Library-HOWTO.sgml db2html Program-Library-HOWTO.sgml # ln -s t1.html Program-Library-HOWTO/t1.html cd Program-Library-HOWTO ; ln -s t1.html index.html chmod -R a+rX Program-Library-HOWTO Program-Library-HOWTO.rtf: Program-Library-HOWTO.sgml db2rtf Program-Library-HOWTO.sgml chmod a+r Program-Library-HOWTO.rtf Program-Library-HOWTO.txt: Program-Library-HOWTO.sgml ./textify < Program-Library-HOWTO.sgml > Program-Library-HOWTO.txt chmod a+r Program-Library-HOWTO.txt Program-Library-HOWTO.sgml.gz: Program-Library-HOWTO.sgml gzip -c < Program-Library-HOWTO.sgml > Program-Library-HOWTO.sgml.gz chmod a+r Program-Library-HOWTO.sgml.gz demo.sgml: demo_use.c libhello.c demo_dynamic.c \ script_static script_shared script_dynamic ./make-demo > demo.sgml libdemos.tar.gz: demo.sgml /bin/rm -fr libdemos.tar.gz tar cvf libdemos.tar.gz *.c *.h \ script_static script_shared script_dynamic print: Program-Library-HOWTO.ps lpr Program-Library-HOWTO.ps clean: rm -fr *.so.* rm -fr *.so rm -fr *.o rm -fr *.junk rm -fr cosine rm -fr Program-Library-HOWTO.log rm -fr Program-Library-HOWTO.aux rm -fr Program-Library-HOWTO.tex # It's an intermediate format rm -fr Program-Library-HOWTO.dvi # Use PS or PDF instead. rm -fr demo_dynamic demo_use demo_use_static really_clean: clean rm -fr Program-Library-HOWTO rm -fr Program-Library-HOWTO.dvi rm -fr Program-Library-HOWTO.log rm -fr Program-Library-HOWTO.ps rm -fr Program-Library-HOWTO.pdf rm -fr Program-Library-HOWTO.tex # In a real development, we'd split the actions of the scripts # into several steps in a makefile. For demo purposes, the actions # are all in a script, and we'll just call the scripts. demo_programs: demo_dynamic demo_use demo_use_static cosine demo_use_static: demo_use.c libhello.c ./script_static demo_use: demo_use.c libhello.c ./script_shared demo_dynamic: demo_dynamic.c demo_use ./script_dynamic cosine: cosine.c gcc -Wl,-export-dynamic -o cosine cosine.c -ldl