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.
6 # On most Linux/Unix type systems, just doing
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
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.
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).
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.
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.
35 #-----------------------------------------------------------------------
37 # These define where to put the Mup products.
38 # You could change this to /usr/local or your own space if you like.
40 BINDIR = $(PREFIX)/bin
41 MANDIR = $(PREFIX)/man/man1
42 DOCDIR = $(PREFIX)/share/doc/packages/mup
44 # This is the name of your C compiler.
45 # cc would be another common choice.
48 # This is the name of your C++ compiler.
49 # CC would be another common choice.
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.
57 # You can change this if your X libraries and headers are somewhere else
61 # The FLTK header files are under $(FLTK_INCLUDE)/FL
62 FLTK_INCLUDE = $(X_LOCATION)/include
64 # You can use fltk_jpeg or jpeg library, whichever you have
67 # You can use fltk_png or png library, whichever you have
70 # You can use fltk_z or z library, whichever you have
73 #-----------------------------------------------------------------------
150 MUPDISP_HDRS = mupdisp/dispttyp.h mupdisp/mupdisp.h
152 MUPDISP_BITMAPS = mupdisp/help.bm mupdisp/waitmsg.bm
154 MKMUPFNT_SRC = mkmupfnt/mkmupfnt.c
162 mupmate/Preferences.C \
175 mupmate/Preferences.H \
181 MUPMATE_OTHER_FILES = \
183 #---------------------------------------------------------------
185 all: mup/mup mupdisp/mupdisp mkmupfnt/mkmupfnt mupmate/mupmate
187 mup/mup: $(MUP_HDRS) $(MUP_SRC)
188 $(CCOMPILER) $(CFLAGS) -o $@ $(MUP_SRC) -lm
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
196 mkmupfnt/mkmupfnt: $(MKMUPFNT_SRC)
197 $(CCOMPILER) $(CFLAGS) -o $@ $(MKMUPFNT_SRC)
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
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
219 rm -f mup/*.o mupdisp/*.o mkmupfnt/*.o mupmate/*.o
222 rm -f mup/mup mupdisp/mupdisp mkmupfnt/mkmupfnt mupmate/mupmate