# # Makefile (MinGW) for htcobrun # prefix=C:/TinyCOBOL exec_prefix=${prefix} INSTALL=install.exe INSTALL_DATA=${INSTALL} INSTBIN=${prefix} #INSTBIN=${prefix}/bin INSTRC=${prefix}/share/htcobol tc_library=../lib/libhtcobol.a RM=rm -f CCX=gcc INCLUDES=-I../lib -I.. LIBS=-L/usr/local/lib -L../lib -lhtcobol LIBS1=-L/usr/local/lib -L../lib -ldb -lpdcurses LIBS2=-L/usr/local/lib -L../lib -lhtcobol -ldb #LIBS2=-L/usr/local/lib -L../lib -lhtcobol -ldb -lpdcurses CCXFLAGS=${INCLUDES} LDFLAGS= SRC1 = htcobrun.c SRC2 = htcobrun.c OBJ1 = $(SRC1:.c=.o) OBJ2 = $(SRC2:.c=.o) PROG1 = htcobrun2 PROG2 = htcobrun PROG3 = htcobrun.sh # # Rules for compiling C sources # .SUFFIX: .c .o .lo .c.o: $(CCX) $(CCXFLAGS) -c $< all: ${PROG2} #all: ${PROG1} ${PROG2} # This will not compile and link on Win32 for some reason ${PROG1}: ${CCX} ${SRC1} -Wl,-export-dynamic -o ${PROG1} \ ${INCLUDES} -Wl,-whole-archive ${tc_library} \ -Wl,-no-whole-archive $(LIBS1) ${PROG2}: ${OBJ2} $(CCX) -o $@ ${OBJ2} $(LDFLAGS) $(LIBS2) clean: @${RM} ${OBJ1} ${OBJ2} ${PROG1}.exe ${PROG2}.exe \ *.exe *.def *.o *.lis *.i *.s core #install: $(PROG1) $(PROG2) install: $(PROG2) # strip $(PROG1) # ${INSTALL} -m 755 $(PROG1) $(INSTBIN)/$(PROG1) strip $(PROG2).exe ${INSTALL} $(PROG2).exe $(INSTBIN)/$(PROG2).exe # ${INSTALL} -m 755 $(PROG3) $(INSTBIN)/$(PROG3)