Commit | Line | Data |
---|---|---|
69695f33 MW |
1 | |
2 | # Makefile for Mup (and auxiliary programs mupdisp, mkmupfnt, and mupmate). | |
3 | # This is not an optimal makefile; instead it tries to be very simple, | |
4 | # and easy to understand, so it can be easily modified, if needed. | |
5 | ||
6 | # On most Linux/Unix type systems, just doing | |
7 | # make install | |
8 | # as root will probably work. | |
9 | # (You really only need to be root to copy the products into | |
10 | # the system directories. If you change PREFIX | |
11 | # to point to some other writeable area, you wouldn't need to be root.) | |
12 | # If you only want the Mup program itself, you can do | |
13 | # make mup/mup | |
14 | # The other programs are optional: | |
15 | # - mupdisp runs Mup and then runs GhostScript on the result. | |
16 | # You can run Mup directly, and use gv, GSview, ghostview or any other | |
17 | # PostScript viewer on the Mup output, as an alternative to mupdisp. | |
18 | # - mkmupfnt is only needed if you want to use fonts beyond the basic | |
19 | # standard PostScript fonts. | |
20 | # - mupmate is a graphical user interface front end for Mup. | |
21 | # It is not needed if you intend to only use Mup via command line interface. | |
22 | ||
23 | # The mupdisp and mupmate programs require X libraries and headers (www.x.org). | |
24 | # The mupmate program requires FLTK libraries and headers (www.fltk.org). | |
25 | ||
26 | # If you want mupdisp to support Linux console mode, make sure you have | |
27 | # the svgalib package installed, then find the two commented-out lines below | |
28 | # related to Linux console support, and uncomment them. | |
29 | ||
30 | ||
31 | # Lines you might conceivably want to change have comments by them, | |
32 | # explaining how you might want to change them. | |
33 | # Any line without any comment by it is very unlikely to ever need changing. | |
34 | ||
35 | #----------------------------------------------------------------------- | |
36 | ||
37 | # These define where to put the Mup products. | |
38 | # You could change this to /usr/local or your own space if you like. | |
39 | PREFIX = /usr | |
40 | BINDIR = $(PREFIX)/bin | |
106454de MW |
41 | MANDIR = $(PREFIX)/share/man/man1 |
42 | DOCDIR = $(PREFIX)/share/doc/mup | |
69695f33 MW |
43 | |
44 | # This is the name of your C compiler. | |
45 | # cc would be another common choice. | |
46 | CCOMPILER = gcc | |
47 | ||
48 | # This is the name of your C++ compiler. | |
49 | # CC would be another common choice. | |
50 | CPPCOMPILER = g++ | |
51 | ||
52 | # -O option turns on optimization for most C compilers. | |
53 | # You can add other options, if you like, as appropriate for your C compiler. | |
54 | # Another common addition would be -g to get debugging information. | |
106454de | 55 | CFLAGS = -O2 -g |
69695f33 MW |
56 | |
57 | # You can change this if your X libraries and headers are somewhere else | |
58 | # (like /usr/X11R6). | |
59 | X_LOCATION = /usr/X11 | |
60 | ||
61 | # The FLTK header files are under $(FLTK_INCLUDE)/FL | |
62 | FLTK_INCLUDE = $(X_LOCATION)/include | |
63 | ||
64 | # You can use fltk_jpeg or jpeg library, whichever you have | |
106454de | 65 | JPEGLIB = jpeg |
69695f33 MW |
66 | |
67 | # You can use fltk_png or png library, whichever you have | |
106454de | 68 | PNGLIB = png |
69695f33 MW |
69 | |
70 | # You can use fltk_z or z library, whichever you have | |
106454de | 71 | ZLIB = z |
69695f33 MW |
72 | |
73 | #----------------------------------------------------------------------- | |
74 | ||
75 | MUP_SRC = \ | |
76 | mup/abshorz.c \ | |
77 | mup/absvert.c \ | |
78 | mup/assign.c \ | |
79 | mup/beaming.c \ | |
80 | mup/beamstem.c \ | |
81 | mup/brac.c \ | |
82 | mup/charinfo.c \ | |
83 | mup/check.c \ | |
84 | mup/debug.c \ | |
85 | mup/errors.c \ | |
86 | mup/extchtbl.c \ | |
87 | mup/font.c \ | |
88 | mup/fontdata.c \ | |
89 | mup/globals.c \ | |
90 | mup/grpsyl.c \ | |
91 | mup/ifgram.c \ | |
92 | mup/lex.c \ | |
93 | mup/locvar.c \ | |
94 | mup/lyrics.c \ | |
95 | mup/macros.c \ | |
96 | mup/main.c \ | |
97 | mup/mainlist.c \ | |
98 | mup/map.c \ | |
99 | mup/midi.c \ | |
100 | mup/midiutil.c \ | |
101 | mup/mkchords.c \ | |
102 | mup/muschtbl.c \ | |
103 | mup/nxtstrch.c \ | |
104 | mup/parstssv.c \ | |
105 | mup/parstuff.c \ | |
106 | mup/phrase.c \ | |
107 | mup/plutils.c \ | |
108 | mup/print.c \ | |
109 | mup/prntdata.c \ | |
110 | mup/prntmisc.c \ | |
111 | mup/prnttab.c \ | |
112 | mup/prolog.c \ | |
113 | mup/range.c \ | |
114 | mup/rational.c \ | |
115 | mup/relvert.c \ | |
116 | mup/restsyl.c \ | |
117 | mup/roll.c \ | |
118 | mup/setgrps.c \ | |
119 | mup/setnotes.c \ | |
120 | mup/ssv.c \ | |
121 | mup/stuff.c \ | |
122 | mup/symtbl.c \ | |
123 | mup/tie.c \ | |
124 | mup/trantab.c \ | |
125 | mup/trnspose.c \ | |
126 | mup/undrscre.c \ | |
127 | mup/utils.c \ | |
128 | mup/ytab.c | |
129 | ||
130 | MUP_HDRS = \ | |
131 | mup/defines.h \ | |
132 | mup/extchar.h \ | |
133 | mup/globals.h \ | |
134 | mup/muschar.h \ | |
135 | mup/rational.h \ | |
136 | mup/ssvused.h \ | |
137 | mup/structs.h \ | |
138 | mup/ytab.h | |
139 | ||
140 | MUPDISP_SRC = \ | |
141 | mupdisp/at386.c \ | |
142 | mupdisp/do_cmd.c \ | |
143 | mupdisp/dos.c \ | |
144 | mupdisp/genfile.c \ | |
145 | mupdisp/init.c \ | |
146 | mupdisp/linvga.c \ | |
147 | mupdisp/mupdisp.c \ | |
148 | mupdisp/xterm.c | |
149 | ||
150 | MUPDISP_HDRS = mupdisp/dispttyp.h mupdisp/mupdisp.h | |
151 | ||
152 | MUPDISP_BITMAPS = mupdisp/help.bm mupdisp/waitmsg.bm | |
153 | ||
154 | MKMUPFNT_SRC = mkmupfnt/mkmupfnt.c | |
155 | ||
156 | MUPMATE_SRC = \ | |
157 | mupmate/Config.C \ | |
158 | mupmate/Edit.C \ | |
159 | mupmate/File.C \ | |
160 | mupmate/Help.C \ | |
161 | mupmate/Main.C \ | |
162 | mupmate/Preferences.C \ | |
163 | mupmate/Run.C \ | |
164 | mupmate/utils.C \ | |
165 | mupmate/license.C \ | |
166 | mupmate/regform.C \ | |
167 | mupmate/template.C | |
168 | ||
169 | MUPMATE_HDRS = \ | |
170 | mupmate/Config.H \ | |
171 | mupmate/Edit.H \ | |
172 | mupmate/File.H \ | |
173 | mupmate/Help.H \ | |
174 | mupmate/Main.H \ | |
175 | mupmate/Preferences.H \ | |
176 | mupmate/Run.H \ | |
177 | mupmate/utils.H \ | |
178 | mupmate/globals.H \ | |
179 | mupmate/resource.h | |
180 | ||
181 | MUPMATE_OTHER_FILES = \ | |
182 | mupmate/mup32.xpm | |
183 | #--------------------------------------------------------------- | |
184 | ||
185 | all: mup/mup mupdisp/mupdisp mkmupfnt/mkmupfnt mupmate/mupmate | |
186 | ||
187 | mup/mup: $(MUP_HDRS) $(MUP_SRC) | |
188 | $(CCOMPILER) $(CFLAGS) -o $@ $(MUP_SRC) -lm | |
189 | ||
190 | mupdisp/mupdisp: $(MUPDISP_HDRS) $(MUPDISP_BITMAPS) $(MUPDISP_SRC) | |
191 | $(CCOMPILER) $(CFLAGS) -L$(X_LOCATION)/lib -o $@ -DNO_VGA_LIB $(MUPDISP_SRC) -lX11 | |
192 | # For Linux console mode support, comment out the previous line | |
193 | # and uncomment the following line | |
194 | # $(CCOMPILER) $(CFLAGS) -L$(X_LOCATION)/lib -o $@ $(MUPDISP_SRC) -lvga -lX11 -lm | |
195 | ||
196 | mkmupfnt/mkmupfnt: $(MKMUPFNT_SRC) | |
197 | $(CCOMPILER) $(CFLAGS) -o $@ $(MKMUPFNT_SRC) | |
198 | ||
199 | mupmate/mupmate: $(MUPMATE_SRC) $(MUPMATE_HDRS) $(MUPMATE_OTHER_FILES) | |
200 | $(CPPCOMPILER) $(CFLAGS) -o $@ $(MUPMATE_SRC) \ | |
201 | -I$(FLTK_INCLUDE) -Imup -L$(X_LOCATION)/lib \ | |
202 | -lfltk -lfltk_images -lXext -lX11 -lXpm \ | |
203 | -l$(JPEGLIB) -l$(PNGLIB) -l$(ZLIB) -lm | |
204 | ||
205 | install: all | |
206 | mkdir -p $(BINDIR) $(MANDIR) $(DOCDIR)/uguide | |
207 | cp mup/mup $(BINDIR)/mup | |
208 | cp mkmupfnt/mkmupfnt $(BINDIR)/mkmupfnt | |
209 | cp mupdisp/mupdisp $(BINDIR)/mupdisp | |
210 | # For Linux console mode support, uncomment the following line | |
211 | # chown root $(BINDIR)/mupdisp ; chmod 4755 $(BINDIR)/mupdisp | |
212 | cp mupmate/mupmate $(BINDIR)/mupmate | |
213 | cp mupprnt $(BINDIR)/mupprnt | |
214 | cp docs/*.1 $(MANDIR) | |
215 | cp docs/README* docs/*.txt docs/*.ps docs/*.mup $(DOCDIR) | |
216 | cp docs/uguide/* $(DOCDIR)/uguide | |
217 | ||
218 | clean: | |
219 | rm -f mup/*.o mupdisp/*.o mkmupfnt/*.o mupmate/*.o | |
220 | ||
221 | clobber: clean | |
222 | rm -f mup/mup mupdisp/mupdisp mkmupfnt/mkmupfnt mupmate/mupmate |