File: mx.in

package info (click to toggle)
styx 1.7-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 13,324 kB
  • ctags: 5,329
  • sloc: ansic: 96,480; sh: 7,972; cpp: 1,572; makefile: 227; xml: 107; pascal: 15
file content (34 lines) | stat: -rw-r--r-- 918 bytes parent folder | download | duplicates (6)
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
#! @SHELL@ -e
# [mx] make 'pl0'

# create subdirectories holding generated files if they don't exist
for subdir in img gen inc prj ; do
  [ -d ${subdir} ] || mkdir ${subdir}
done

INCLUDES="-I./inc -I@includedir@"

# For static linking, you may need to uncomment these 2 lines
# LDFLAGS=-static
# LIBS="-ldl -lrt -lpthread"

#destination directory for parser and scanner table image files
BINSTYX=./img
#destination directory for parser and scanner table and term interface source files
GENSTYX=./gen
#source directory of language specification file
SPESTYX=.

export BINSTYX GENSTYX SPESTYX

#create source files
styx pl0 -makeC -makeINT -makeIMG -verbose

#create header files for generated c-sources
ctoh -ct -CPATH=./gen -HPATH=./inc -PRJ=./prj 

#compile sources to program 'pl0'
gcc ${CFLAGS} ${INCLUDES} ${LDFLAGS} \
    pl0.c ./gen/pl0_pim.c ./gen/pl0_lim.c ./gen/pl0_int.c \
    -ldstyx ${LIBS} \
    -o pl0