################################################################### # # # 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 # # # # # ################################################################### # # We have now separated the compilation options from the Make options, # see the file options.h for how to compile in devices and (maybe) placate # your compiler. Of course, you are still free to define them on the command # line instead # # The macro HARD is only useful (as far as we know) on a Sun, so others # should probably delete it. (As distributed, it assumes that you have a # floating point board, which might not be true.) This macro is defined # in sm/Makefile as well, and should be defined consistently between # the two makefiles # # You may not need to define MAKE at all # # If you have trouble with bison or sm needing "alloca", edit the # options.h file to define NO_ALLOCA, which says that it doesn't exist # # If your system doesn't support (or need) ranlib, remove the definition # of $(RANLIB). For System V, you probably don't want it. # # Default rules for compiling code # ### MSDOS ### # as considerable changes were made to this file, no comment shall # be inserted near any modification. this file should be considered # simply as yet another (MSDOS-specific) makefile ! # CC = bcc DEBUG = -v -N MODEL = l OPTIMIZE = -d -O2 -w-pro # OPTIMIZE = -d -O1 -Oc -Og -Ol -Op -Ov !if $d(WIN) WINDOWS = -W !else OVERLAY = -Yo NOOVERLAY = -Yo- OVERLAYINIT = -Y GRAPHLIB = $(NOOVERLAY) graphics.lib !endif !if $d(OWNER) _OWNER = -DOWNER !endif CFLAGS = -m$(MODEL) $(DEBUG) $(OPTIMIZE) -Ff=2048 # .c.obj : $(CC) -c $(OVERLAY) $(WINDOWS) $(CFLAGS) {$*.c } # # linker flags: # LDFLAGS = -m$(MODEL) $(WINDOWS) $(DEBUG) # MAKE = make -fmakefile.dos # OTHEROBJS = \ sm_main.obj control.obj do_for.obj editor.obj fft.obj getlist.obj \ help.obj history.obj input.obj lexan.obj keymac.obj \ macros.obj macroed.obj math.obj more.obj mscanf.obj name.obj \ numword.obj pow.obj printv.obj random.obj readcol.obj read_old.obj \ restore.obj spline.obj tokens.obj userfn.obj variable.obj \ vec_arith.obj vec_logical.obj vec_misc.obj vec_strings.obj \ yylex.obj OBJECT = main.obj $(OTHEROBJS) # # Which compiler-compiler to use (you can't use yacc any more, sorry) # YACC = bison -y # # Make all targets (should be first in Makefile) # all : sm.exe # # Make SM # sm.exe : $(OBJECT) libdevices.lib libplotsub.lib libutils.lib smstub.exe $(CC) -esm $(LDFLAGS) @&&! $(OVERLAYINIT) main.obj $(OVERLAY) $(OTHEROBJS) libplotsub.lib libdevices.lib libutils.lib $(GRAPHLIB) ! # link : $(CC) -esm $(LDFLAGS) @&&! $(OVERLAYINIT) main.obj $(OVERLAY) $(OTHEROBJS) libplotsub.lib libdevices.lib libutils.lib $(GRAPHLIB) ! # # make windows stub # smstub.exe : smstub.c $(CC) -ms smstub.c # # Make main.c # (special compiler flags), NO OVERLAYing because of interrupt handlers # main.obj : main.c ..\AA_Version.h options.h stack.h $(CC) -c $(OVERLAYINIT) $(WINDOWS) $(CFLAGS) $(_OWNER) main.c # # make control.c from control.y # Be careful to see that control.h is updated if and only if necessary # control.c control.h : control.y $(YACC) -d control.y @- ren control.c controlc.bak @- ren control.h controlh.bak ren y_tab.c control.y ren y_tab.h control.h touch control.c touch control.h control.obj : control.y control.h devices.h options.h stack.h \ vectors.h yaccun.h control.c $(CC) -c $(OVERLAY) $(WINDOWS) $(CFLAGS) -DYYLSP_NEEDED control.c # # make yylex.c from the list of tokens in control.h, # and using lexan() as a source for tokens. # makeyyl.exe : makeyyl.c $(CC) $(CFLAGS) makeyyl.c # yylex.c : control.h makeyyl.exe .\makeyyl control.h lexan yylex # # sm_main can include a block of local code from local.c # sm_main.o : local.c # # Get the libraries from the subdirectories. # libdevices.lib : Devices Devices : @ cd devices @ $(MAKE) -DCC="$(CC)" -DCFLAGS="$(OVERLAY) $(WINDOWS) $(CFLAGS)" \ ..\libdevices.lib @ cd .. libplotsub.lib : Plotsub Plotsub : @ cd plotsub @ $(MAKE) -DCC="$(CC)" -DCFLAGS="$(OVERLAY) $(WINDOWS) $(CFLAGS)" \ ..\libplotsub.lib @ cd .. libutils.lib : Utils Utils : @ cd utils @ $(MAKE) -DCC="$(CC)" -DCFLAGS="$(OVERLAY) $(WINDOWS) $(CFLAGS)" \ ..\libutils.lib @ cd .. # # clean out all object code and junk files # empty : clean - del sm.exe clean : - del \\brief\\backup\\????????.??? - rmdir \brief\backup - rmdir \brief - del *.obj - del *.lib - del *.bak - del makeyyl.exe - del smstub.exe - del yylex.c # - del control.c # - del control.h - cd devices - $(MAKE) clean - cd ..\plotsub - $(MAKE) clean - cd ..\utils - $(MAKE) clean - cd .. # # Here are all the dependencies: # #START_DEPEND # MSDOS: dependencies grouped in one line per file do_for.obj : options.h vectors.h yaccun.h editor.obj : charset.h edit.h options.h tty.h fft.obj : options.h sm.h getlist.obj : options.h vectors.h yaccun.h help.obj : options.h history.obj : charset.h edit.h options.h input.obj : charset.h options.h stack.h lexan.obj : lex.h options.h vectors.h yaccun.h keymac.obj : charset.h edit.h options.h macros.obj : charset.h options.h stack.h tree.h macroed.obj : charset.h edit.h options.h more.obj : charset.h options.h mscanf.obj : options.h name.obj : options.h numword.obj : options.h printv.obj : options.h vectors.h readcol.obj : charset.h options.h vectors.h read_old.obj : options.h restore.obj : options.h vectors.h spline.obj : options.h vectors.h tokens.obj : control.h options.h vectors.h yaccun.h userfn.obj : options.h variable.obj : options.h tree.h vec_arith.obj : options.h vectors.h vec_logical.obj : options.h vectors.h yylex.obj : control.h lex.h options.h stack.h vectors.h yaccun.h