Advertisement
Guest User

Untitled

a guest
Nov 19th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 2.75 KB | None | 0 0
  1. # GLOBALS
  2. RM = del /s
  3.  
  4. ROOT = $(shell echo %CD%)
  5.  
  6. V68k = $(ROOT)\vasm68k
  7. VZ80 = $(ROOT)\vasmz80
  8. # VSH2 = $(ROOT)\asmsh
  9. VLINK = $(ROOT)\vlink
  10. MAKE = $(ROOT)\make
  11. DEPS = $(ROOT)\src\_deps
  12. OBJ = $(ROOT)\src\__obj
  13. LST = $(ROOT)\src\__lst
  14. SRC = $(ROOT)\src
  15. # LEVELS?
  16. # SOUND?
  17. # ETC?
  18.  
  19. BUILDARGS =
  20. # Internal
  21. BUILDARGS += -Fvobj
  22. BUILDARGS += -maxerrors=32
  23. BUILDARGS += -nocase
  24. # BUILDARGS += -nosym
  25. BUILDARGS += -unsshift
  26. # Mot Syntax
  27. BUILDARGS += -ldots
  28. BUILDARGS += -spaces
  29. # m68k CPU
  30. BUILDARGS += -m68000
  31. BUILDARGS += -opt-allbra
  32. BUILDARGS += -opt-brajmp
  33. BUILDARGS += -opt-clr
  34. BUILDARGS += -opt-lsl
  35. BUILDARGS += -opt-movem
  36. BUILDARGS += -opt-mul
  37. BUILDARGS += -opt-div
  38. BUILDARGS += -opt-pea
  39. BUILDARGS += -opt-speed
  40. BUILDARGS += -sc
  41. BUILDARGS += -regsymredef
  42.  
  43. PARSEGLOBALS =
  44. PARSEGLOBALS += RM=$(RM)
  45. PARSEGLOBALS += ROOT=$(ROOT)
  46. PARSEGLOBALS += V68k=$(V68k)
  47. PARSEGLOBALS += VZ80=$(VZ80)
  48. PARSEGLOBALS += VSH2=$(VSH2)
  49. PARSEGLOBALS += VLINK=$(VLINK)
  50. PARSEGLOBALS += MAKE=$(MAKE)
  51. PARSEGLOBALS += SRC=$(SRC)
  52. PARSEGLOBALS += OBJ=$(OBJ)
  53. PARSEGLOBALS += LST=$(LST)
  54. PARSEGLOBALS += BUILDARGS=$(BUILDARGS)
  55.  
  56. # vasm68k %BUILDARGS% -L out.txt -o out.o test.asm
  57. # vlink -brawbin1 -o out.bin -s out.o
  58.  
  59. # todo: todo bien, aunque necesitamos saber cómo sacar un listing de tal forma que muestre las equates de include y tal vez macros
  60. # y si no, incluir el buildconf (y que dentro incluya los demas) individualmente, pues todos estarán en misma raíz ;)
  61.  
  62. # create final MD ROM
  63. # s1built.bin: $(OBJ)\_varstemp.o $(OBJ)\md.header.o $(OBJ)\md.gameinit.o $(OBJ)\md.mainloop.o $(OBJ)\md.library.o $(OBJ)\md.main.o $(OBJ)\md.resource.o
  64. s1built.bin: $(OBJ)\_varstemp.o $(OBJ)\md.header.o $(OBJ)\md.main.o
  65.     $(VLINK) -brawbin1 -T$(SRC)\romMd.ld -o $@ $^
  66.  
  67. # create "header" section
  68. $(OBJ)\md.header.o: $(SRC)\md.header.asm
  69.     $(V68k) $(BUILDARGS) -L $(LST)\$(notdir $(basename $@)).txt -o $@ $<
  70.  
  71. # create "main" section
  72. # $(OBJ)\md.main.o: $(OBJ)\md.ints.o $(OBJ)\md.screens.o $(OBJ)\md.objects.o
  73. $(OBJ)\md.main.o: $(OBJ)\md.ints.o
  74.     $(VLINK) -r -o $@ $^
  75.  
  76. # "how to" compile each .ASM file as necessary
  77. %.o: %.asm
  78.     $(V68k) $(BUILDARGS) -L $(LST)\$(notdir $(basename $@)).txt -o $(OBJ)\$@ $<
  79.  
  80. # compile "ints" for "main" section
  81. CUR = $(SRC)\ints
  82. VPATH = $(OBJ) $(CUR)
  83. INPUT = $(notdir $(wildcard $(CUR:\=/)/*))
  84. $(OBJ)\md.ints.o: vinthandler.md.o $(INPUT:.asm=.o)
  85.     $(VLINK) -r -o $@ $(addprefix $(OBJ)\,$(notdir $^))
  86.  
  87. # Ensure to recompile everything if vars change
  88. $(OBJ)\_varstemp.o: $(SRC)\buildconf.asm $(SRC)\_equ.asm $(SRC)\_macro.asm
  89.     $(RM) $(OBJ)\*.o
  90.     $(V68k) $(BUILDARGS) -L $(LST)\$(notdir $(basename $@)).txt -o $@ $(OBJ)\dummy.asm
  91.     $(VLINK) -brawbin1 -o $(OBJ)\$(notdir $(basename $@)).bin -s $@
  92.  
  93. clean:
  94.     $(RM) $(OBJ)\*.o
  95.     $(RM) s1built.bin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement