tinycobol/test.code/tgui02/Makefile.mingw

80 lines
1.4 KiB
Makefile

#
#
#
prefix=..
exec_prefix=../../compiler
exec_prefix=${prefix}/share/htcobol
g_includes=-I/usr/local/include
g_libraries=-L/usr/local/lib -LC:/TinyCOBOL
CCX=gcc
COB=htcobol
ASM=as
WRES=windres
WRESFLAGS=-O coff
RM=rm -f
#COPYBOOKS= -I${exec_prefix}/copybooks -I.
COPYBOOKS=-I.
INCLUDES=-I. ${g_includes}
LIBS=${g_libraries} -lhtcobol -ldb -lm -lcomctl32 -luser32
LDFLAGS=-mwindows
COBFLAGS=-P $(COPYBOOKS)
ASMFLAGS=-D
CCXFLAGS=-g ${INCLUDES}
SRC1 = wprog01.c
SRC2 = wprog02.c
SRC3 = wprog03.cob
SRC4 = wres04.rc
SRC5 = subp01.cob
OBJ1 = $(SRC1:.c=.o)
OBJ2 = $(SRC2:.c=.o)
OBJ3 = $(SRC3:.cob=.o)
OBJ4 = $(SRC4:.rc=.o)
OBJ5 = $(SRC5:.cob=.o)
OBJS1 = $(OBJ1) $(OBJ4) $(OBJ5)
OBJS2 = $(OBJ2) $(OBJ5)
OBJS3 = $(OBJ3) $(OBJ5)
PROG1 = tgui02a
PROG2 = tgui02b
PROG3 = tgui02c
include ${prefix}/config/C.rules.in
include ${prefix}/config/COB.rules.in
#include ${prefix}/config/COB.build.tmpl.in
#include ${prefix}/config/COB.build.tmpl.t.in
all: ${PROG1} ${PROG2} ${PROG3}
${PROG1}: ${OBJS1}
$(CCX) -o $@.exe ${OBJS1} $(LDFLAGS) $(LIBS)
# strip $@
${PROG2}: ${OBJS2}
$(CCX) -o $@.exe ${OBJS2} $(LDFLAGS) $(LIBS)
# strip $@
${PROG3}: ${OBJS3}
$(CCX) -o $@.exe ${OBJS3} $(LDFLAGS) $(LIBS)
# strip $@
wres04.o: wres04.rc
$(WRES) $(WRESFLAGS) $< $@
clean: cleanf
@${RM} ${OBJ1} ${OBJ2} ${OBJ3} $(PROG1)*lis ${PROG1}*s \
core *.lis *.s *.i *.o *.exe
cleanf fclean:
@${RM} f1.txt f2.txt f3.txt
#