> LEVIE, TED JUNE TUTORIAL DRAFT > LC: 145 Listing 1: Multiple makefiles in the top level directory make it easier to manage various operating systems while keeping only one copy of the source code up to date. Note that the subdirectories also have their own various makefiles, libraries, and executables built for each platform. tlevie@patriot% ^^pwd^^ /a/common/src/Mosaic-2.0 tlevie@patriot% ls CHANGES Makefile.ncr_r4 README-HDF libdtm COPYRIGHT Makefile.ncr_r5 XKeysymDB libhtmlw FEATURES Makefile.sun backup libnet Makefile README documents.menu libwww2 Makefile.ibm README-2.0 libXmx src tlevie@patriot% ^^ls libwww2^^ ... HTPlain.c Makefile.ibm HTPlain.h Makefile.ncr_r4 HTSort.c Makefile.ncr_r5 HTSort.h Makefile.sun HTString.h libwww.aix_3.2.a HTTCP.c libwww.ncr_r4.a HTTCP.h libwww.ncr_r5.a tlevie@patriot% ^^ls libhtmlw^^ ... Makefile.ibm inkstore.h Makefile.ncr_r4 libhtmlw.aix_3.2.a Makefile.ncr_r5 libhtmlw.ncr_r4.a Makefile.sun libhtmlw.ncr_r5.a tlevie@patriot% ^^ls src^^ Makefile bitmaps Makefile.ibm gifread.c Makefile.ncr_r4 globalhist.c Makefile.ncr_r5 grpan-www.c Makefile.sun grpan.c Mosaic.aix_3.2 gui-dialogs.c Mosaic.ncr_r4 gui-documents.c Mosaic.ncr_r5 gui-menubar.c ... tlevie@patriot% [] Listing 2: Note on line 40 of Makefile.ncr_r4 the NCR flag that is set with -D. This triggers the #include statement on line 22 in HTFile.c. ^^File: Makefile.ncr_r4^^ . . . 11 # ---------------- CUSTOMIZABLE OPTIONS ----------------- 12 13 # RANLIB = /bin/true 14 ### On non-SGI's, this should be ranlib. 15 RANLIB = ranlib . . . 29 ### Random system configuration flags. 30 ### -->> For Motif 1.2 ON ANY PLATFORM, do -DMOTIF1_2 31 ### For IBM AIX 3.2, do -D_BSD 32 ### For NeXT, do -DNEXT 33 ### For HP/UX, do -Aa -D_HPUX_SOURCE 34 ### For Dell SVR4, do -DSVR4 35 ### For Solaris, do -DSVR4 36 ### For Esix 4.0.4 and Solaris x86 2.1, do -DSVR4 37 ### For Convex whatever, do -DCONVEX 38 ### For SCO ODT 3.0, do -DSCO -DSVR4 -DMOTIF1_2 39 ### For Motorola SVR4, do -DSVR4 -DMOTOROLA -DMOTIF1_2 40 sysconfigflags = -DSVR4 -DNCR ^^File: libwww2/HTFile.c^^ . . . 19 #include "HTFile.h" /* Implemented here */ 20 21 /* for compiling on NCR SVR4 v2.0 & v2.02D systems: */ 22 #ifdef NCR 23 #include /* so that DIR type is defined */ 24 #include /* so that O_RDONLY for open() is defined */ 25 #endif Listing 3: The HTML code above produces the document you see in Figure 1. My Home Page

Welcome to My Home Page

Click on the underlined off-color areas to access other information.

For help, click here.

Click here to look at a gopher server.

This is an H4 header

Headers come in sizes 1 through 6.

Mosaic will format your text for you (joining lines, word wrap, etc.) unless you use the PRE tag:

    Something
       like this.

Instead of:

Something like this.

A graphic like this can be an anchor also -- just click on the picture to see more info about me!

Click here to see the NCSA home page. Listing 4: Entries in the mime.types file match a file type (e.g. application/postscript) with file extensions (e.g. .ps or .PS). The mailcap file file matches file types with the viewer used to display each one (the ^^%s^^ in the mailcap file is the file to be viewed. tlevie@patriot% ^^cat mime.types^^ . . . audio/x-wav wav application/postscript ps PS application/x-maker frame image/gif gif image/jpeg jpeg jpg jpe text/html html text/plain txt tlevie@patriot% ^^cat mailcap^^ . . . # This maps all types of images (image/gif, image/jpeg, etc.) # to the viewer 'xv'. image/*; xv %s # This maps MPEG video data to the viewer 'mpeg_play'. video/mpeg; mpeg_play %s # This maps all types of .frame files to be viewed # using /usr/local/bin/maker application/x-maker; /stor/common/frame/bin/maker -run_in_fg -f %s tlevie@patriot% [] -30-