home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / togl15.zip / a1.zip / Makefile < prev    next >
Makefile  |  2000-02-16  |  2KB  |  57 lines

  1.  
  2. # define things needed during the make
  3. CC = gcc
  4.  
  5. OPENGL_DIR = H:/opengl
  6. TCLTK_DIR = H:/tcl805
  7.  
  8. # There are two ways to compile under OS/2, one way uses .o and
  9. # .a files.  This way uses .obj and .lib files.  gdb only works
  10. # when compiling the other way.  Feel free to read the emx
  11. # documentation and try compiling the other way.
  12.  
  13. CFLAGS= -I$(OPENGL_DIR)/include -I$(TCLTK_DIR)/include \
  14.         -g -m486 -Zomf -Zmtd
  15.         
  16. # I'm not sure what all these options do, but this works for me.
  17. # If you know more than I do you can fiddle with them.
  18.         
  19. LFLAGS= -Zexe -Zomf -Zmtd -Zstack 32 -Zlinker /BASE:0x10000 \
  20.         -Zlinker /ALIGN:2 -Zlinker /FARCALLTRANSLATION -Zlinker \
  21.         /RUNFROMVDM -Zlinker /EXEPACK
  22.  
  23. # assumes libpng has been installed in the emx (default lib) directory
  24. LIBS=     -lpng -L$(OPENGL_DIR)/lib -llibtk -lopengl -L$(TCLTK_DIR)/lib \
  25.         -ltk80 -ltcl80
  26.         
  27. GRLIBS = grsh.obj gr.obj Draw.obj util.obj togl.obj pic.obj
  28.  
  29. # define how to make the shell 
  30. grsh.exe: $(GRLIBS)
  31.     $(CC) -o grsh $(LFLAGS) $(GRLIBS) $(LIBS) grsh.def
  32.  
  33. togl.obj: togl.c togl.h
  34.     $(CC) $(CFLAGS) -c togl.c
  35.  
  36. grsh.obj: grsh.c
  37.     $(CC) $(CFLAGS) -c grsh.c
  38.  
  39. gr.obj: gr.c
  40.     $(CC) $(CFLAGS) -c gr.c
  41.  
  42. util.obj: util.c
  43.     $(CC) $(CFLAGS) -c util.c
  44.  
  45. Draw.obj: Draw.c
  46.     $(CC) $(CFLAGS) -c Draw.c
  47.  
  48. pic.obj: pic.c
  49.     $(CC) $(CFLAGS) -c pic.c
  50.  
  51. # || REM is a trick I made up to have del succeed (return no error)
  52. # even if the files aren't there. ... There's probably a better way.
  53. clean:
  54.     del core *.obj *.png grsh || REM
  55. Clean: clean
  56.     del grsh.exe  || REM
  57.