################################################################### # # # SSSS M M # # S S MM MM # # S M M M M # # SSSS M M M M # # S M M M # # S S M M # # SSSS M M # # # # # ################################################################### # # This makefile makes various standalone programmes, and then # SM itself, in subdirectory src. See the makefile in src # and (especially) the file options.h to modify the ways that SM is compiled # # If you change (e.g.) the value of CC in this Makefile, you must either # always run always make from this directory, or edit src/Makefile too. # .c.obj : $(CC) -c $(CFLAGS) {$*.c } # # Which compiler to use. # # OS/2 use Borland's C++ v1.5 compiler CC = bcc # # cc flags # DEBUG = -v -N CFLAGS = -A -Isrc -r- $(DEBUG) MAKE = make -fmakefile.os2 # # Path to search for sm.def files # DEFAULT_PATH =". ~" # # linker flags # LDFLAGS = $(DEBUG) # # Make all targets (should be first in Makefile) # all : notice sm.exe fonts sm_pmdev notice : @- echo. @- echo SM is copyright 1987, 1989, 1990, 1992 Robert Lupton and Patricia Monger. @- echo You may not distribute either source or executables without @- echo specific permission from the authors. See the file copyright.h @- echo for more details. @- echo. # # Make SM # sm.exe : cd src $(MAKE) DEFAULT_PATH=$(DEFAULT_PATH) cd .. # # This makes the OS/2 Presentation Manager device and places a copy in src\ # sm_pmdev : cd os2 echo os2 $(MAKE) -r sm_pmdev cd .. # # Now various stand-alone programmes: # # Convert the fonts to binary format # read_fonts.exe : read_fonts.obj $(CC) $(CFLAGS) -eread_fonts read_fonts.obj # fonts : fonts.bin fonts.bin : read_fonts.exe hershey_oc.dat font_index tex.def .\read_fonts hershey_oc.dat font_index tex.def fonts.bin # # Bootstrap compile_g without a valid cacheg.dat file # (not made by default) # boot_g.exe : compile_g.obj src\tty.h $(CC) $(LDFLAGS) $(CFLAGS) -DBOOTSTRAP -eboot_g -Isrc compile_g.c # # The programme to compile graphcap entries # compile_g.obj : src\dummies.h src\tty.h compile_g.exe : compile_g.obj src\libdevices.lib src\libutils.lib $(CC) $(LDFLAGS) -ecompile_g compile_g.obj \ src\libdevices.lib src\libutils.lib graphics.lib # # Extract the grammar from a yacc/bison file # get_grammar : get_grammar.obj $(CC) -eget_grammar get_grammar.obj # # Rasterise vector files produced by the "raster" device # rasterise.obj : src\dummies.h rasterise.exe : rasterise.obj src\libdevices.lib src\libutils.lib $(CC) $(LDFLAGS) -erasterise rasterise.obj \ src\libdevices.lib src\libutils.lib # # clean out all object code and junk files # empty : clean - del fonts.bin - del read_fonts.exe - del compile_g.exe - del boot_g.exe - del get_grammar.exe - cd src - $(MAKE) empty - cd ..\os2 - $(MAKE) empty - cd ..\callable - $(MAKE) empty - cd ..\info - $(MAKE) empty - cd .. clean : - del *.obj - cd src - $(MAKE) clean - cd ..\os2 - $(MAKE) clean - cd ..\callable - $(MAKE) clean - cd .. # # Here are all the dependencies: # #START_DEPEND read_fonts.obj : src\fonts.h src\options.h