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
|
Installing dpic:
On a Unix-lide system, type `make' to compile the sources, which are
C99 and gcc-10 compatible and should compile and load on most systems.
Otherwise type `chmod +x ./configure' (if necessary), `./configure'
and then `make'.
With MinGW, in a MinGW shell window, type `./configure' and then `make'
to add a library to the linking step in order to load the random() routines.
On older machines you may have to check the settings at the top of
the Makefile. Type
`make install' or `sudo make install'
as necessary, to install the executable in /usr/bin, a man page
in /usr/share/man/man1,
and dpic-doc.pdf in /usr/share/dpic. Typing
`make PREFIX=local install'
puts the files in /usr/local instead of /usr.
To install the executable only, type
`make installdpic'
and to install the documents only, type
`make installdocs'.
To compile in safe mode, with debug enabled, or with MinGW, DJGPP,
or other non-Linux compiler, refer to the top of the Makefile.
Web-server installation:
You probably should disable the sh and copy commands in dpic for
security reasons. Uncomment the SAFEMODE definition in Makefile
or type `make SAFEMODE=-DSAFE_MODE'. If you do not do this, the -z
command-line option has the same effect (see below).
Otherwise, commands equivalent to the following should do the trick:
gcc -O -c main.c
gcc -O -c -o parser.o dpic.tab.c
gcc -O -c backend.c
gcc -o dpic main.o parser.o backend.o -lm
The following has also been used when the random() routines are not found:
gcc -O -c -Dsrandom=srand -Drandom=rand main.c
gcc -O -c -o parser.o -Dsrandom=srand -Drandom=rand dpic.tab.c
gcc -O -c backend.c
gcc -o dpic main.o parser.o backend.o -lm
|