summaryrefslogtreecommitdiff
path: root/src/os_mac.build
blob: 014c037debe2385c0aa57757801ca9bf3cc0043e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
set 68kTarget "68k"
set ppcTarget "ppc"
set carbonTarget "carbon"
set vimTargets "`getlistitem -m " Select the vim target platform" -c -q "{68kTarget}" "{ppcTarget}" "{carbonTarget}"`"
if !"{vimTargets}"
   echo "No Makefile created"
   exit 0
end
#
set generalSources "buffer.c charset.c diff.c digraph.c edit.c eval.c ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c fileio.c fold.c getchar.c gui.c gui_mac.c if_cscope.c main.c mark.c memfile.c memline.c menu.c message.c misc1.c misc2.c move.c mbyte.c normal.c ops.c option.c os_mac.c pty.c quickfix.c regexp.c screen.c search.c tag.c term.c termlib.c ui.c undo.c version.c window.c"
set generalOpts "-app -c 'VIM!' -t 'APPL' -i :proto"
set generalCOpts "-w 2,35 -enum int"
set generalLOpts "-mf -d"
set generalLibs ""
#
#
set 68kSources ""
set 68kOpts "-model far"
set 68kCOpts ""
set 68kLOpts ""
set 68kLibs ""
#
set ppcSources "syntax.c"
set ppcOpts "-powerpc"
set ppcCOpts ""
set ppcLOpts "{SharedLibraries}AppearanceLib"
set ppcLibs "{SharedLibraries}ContextualMenu"
#
set carbonSources ""
set carbonOpts "-carbon"
set carbonCOpts "-d TARGET_API_MAC_CARBON"
set carbonLOpts ""
set carbonLibs "{SharedLibraries}CarbonLib"
#
for vTarget in {vimTargets}
   set vSources "{generalSources}"
   set vLibs "{generalLibs}"
   set vOpts "{generalOpts}"
   set vCOpts "{generalCOpts}"
   set vLOpts "{generalLOpts}"
   set ppc ""
   if "{vTarget}" == "{68kTarget}"
      set vSources "{vSources} {68kSources}"
      set vOpts "{vOpts} {68kOpts}"
      set vLibs "{vLibs} {68kLibs}"
      if  "{68kCOpts}"
         set vCOpts "{vCOpts} {68kCOpts}"
      end
      if  "{68kLOpts}"
         set vLOpts "{vLOpts} {68kLOpts}"
      end
   else
      set ppc "ppc"
      set vSources "{vSources} {ppcSources}"
      set vOpts "{vOpts} {ppcOpts}"
      set vLibs "{vLibs} {ppcLibs}"
      if  "{ppcCOpts}"
         set vCOpts "{vCOpts} {ppcCOpts}"
      end
      if  "{ppcLOpts}"
         set vLOpts "{vLOpts} {ppcLOpts}"
      end
      if "{vTarget}" == "{carbonTarget}"
         set vSources "{vSources} {carbonSources}"
         set vLibs "{vLibs} {carbonLibs}"
         set vOpts "{vOpts} {carbonOpts}"
         if  "{carbonCOpts}"
            set vCOpts "{vCOpts} {carbonCOpts}"
         end
         if  "{carbonLOpts}"
            set vLOpts "{vLOpts} {carbonLOpts}"
         end
      end
   end
   set vODir :obj-{vTarget}:
   if !"`exists -d {vOdir}`"
      newFolder {vODir}
   end
   set vApp vim-{vTarget}
   if "{vCOpts}"
      set vOpts "{vOpts} -{ppc}COptions '{vCOpts}'"
   end
   if "{vLOpts}"
      set vOpts "{vOpts} -{ppc}LinkOptions '{vLOpts}'"
   end
   set vOpts "{vOpts} -objdir {vODir}"
   createmake {vApp} {vOpts} {vSources} {vLibs}
   if !{Status}
      echo "Makefile for {vApp} successfully created"
   end
end