61 lines
1.2 KiB
Makefile
61 lines
1.2 KiB
Makefile
#
|
|
# Makefile to create binary form COBOL source
|
|
#
|
|
|
|
prefix=..
|
|
exec_prefix=../../compiler
|
|
g_includes=-I/usr/local/include
|
|
g_libraries=-L/usr/local/lib -L/usr/lib
|
|
|
|
CCX=gcc
|
|
#COB=${exec_prefix}/htcobol
|
|
COB=htcobol
|
|
ASM=as
|
|
RM=rm -f
|
|
|
|
COPYBOOKS= -I../copybooks -I.
|
|
INCLUDES=-I./ ${g_includes}
|
|
LIBS=${g_libraries} -L../../lib -lhtcobol -lncurses -ldb -ldl -lm
|
|
LDFLAGS=
|
|
#COBFLAGS=-P -D -g -t ${COPYBOOKS}
|
|
COBFLAGS=-P ${COPYBOOKS}
|
|
ASMFLAGS=-D
|
|
|
|
SRC1 = test23.cob
|
|
SRC2 = test23a.cob
|
|
SRC3 = test23b.cob
|
|
|
|
OBJS1 = $(SRC1:.cob=.o)
|
|
OBJS2 = $(SRC2:.cob=.o)
|
|
OBJS3 = $(SRC3:.cob=.o)
|
|
|
|
PROG1 = test23
|
|
PROG2 = test23a
|
|
PROG3 = test23b
|
|
|
|
PROGS = $(PROG1) $(PROG2) $(PROG3)
|
|
|
|
include ${prefix}/config/COB.rules.in
|
|
include ${prefix}/config/COB.build.tmpl.in
|
|
#include ${prefix}/config/COB.build.tmpl.t.in
|
|
|
|
all: ${PROGS}
|
|
|
|
${PROG1}: ${OBJS1}
|
|
$(CCX) -g -o $@ ${OBJS1} $(LDFLAGS) $(LIBS)
|
|
# strip $@
|
|
|
|
${PROG2}: ${OBJS2}
|
|
$(CCX) -g -o $@ ${OBJS2} $(LDFLAGS) $(LIBS)
|
|
# strip $@
|
|
${PROG3}: ${OBJS3}
|
|
$(CCX) -g -o $@ ${OBJS3} $(LDFLAGS) $(LIBS)
|
|
|
|
#
|
|
clean:
|
|
@${RM} ${OBJS1} $(PROG1) $(PROG1)*lis ${PROG1}*txt ${PROG1}*s \
|
|
${OBJS2} $(PROG2) $(PROG2)*lis ${PROG2}*txt ${PROG2}*s \
|
|
${OBJS3} $(PROG3) $(PROG3)*lis ${PROG3}*txt ${PROG3}*s \
|
|
core *run.err.trace.txt *run.trace.txt temp*cob \
|
|
test23*.txt
|