From 81f2f121b334f0ecef6bcbc3cbe4acda9c3acb16 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 16 Oct 2007 22:37:24 +0000 Subject: [PATCH] 2007-10-17 00:33 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/Makefile + contrib/win32prn/Makefile + contrib/win32prn/makefile.vc + contrib/win32prn/make_vc.bat + Added win32prn to GNU make system. + Added VC makefiles for win32prn. --- harbour/ChangeLog | 8 ++ harbour/contrib/Makefile | 1 + harbour/contrib/win32prn/Makefile | 16 +++ harbour/contrib/win32prn/make_vc.bat | 21 ++++ harbour/contrib/win32prn/makefile.vc | 141 +++++++++++++++++++++++++++ 5 files changed, 187 insertions(+) create mode 100644 harbour/contrib/win32prn/Makefile create mode 100644 harbour/contrib/win32prn/make_vc.bat create mode 100644 harbour/contrib/win32prn/makefile.vc diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b6ac670216..c33d8d9b2b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,14 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-10-17 00:33 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/Makefile + + contrib/win32prn/Makefile + + contrib/win32prn/makefile.vc + + contrib/win32prn/make_vc.bat + + Added win32prn to GNU make system. + + Added VC makefiles for win32prn. + 2007-10-16 23:58 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * source/rtl/isprint.c - Removed Win32 bitmap printer specific (non-multiplatform) diff --git a/harbour/contrib/Makefile b/harbour/contrib/Makefile index 41faa8591c..c16f0fa202 100644 --- a/harbour/contrib/Makefile +++ b/harbour/contrib/Makefile @@ -34,6 +34,7 @@ DIRS +=\ ole2 \ odbc \ adordd \ + win32prn \ endif diff --git a/harbour/contrib/win32prn/Makefile b/harbour/contrib/win32prn/Makefile new file mode 100644 index 0000000000..5cc4200394 --- /dev/null +++ b/harbour/contrib/win32prn/Makefile @@ -0,0 +1,16 @@ +# +# $Id$ +# + +ROOT = ../../ + +C_SOURCES=\ + tprinter.c \ + w32_papi.c \ + +PRG_SOURCES=\ + w32_pcls.prg \ + +LIBNAME=hbwin32prn + +include $(TOP)$(ROOT)config/lib.cf diff --git a/harbour/contrib/win32prn/make_vc.bat b/harbour/contrib/win32prn/make_vc.bat new file mode 100644 index 0000000000..95bbba68dd --- /dev/null +++ b/harbour/contrib/win32prn/make_vc.bat @@ -0,0 +1,21 @@ +@echo off +rem +rem $Id$ +rem + +:BUILD + + nmake /f makefile.vc %1 %2 %3 > make_vc.log + if errorlevel 1 goto BUILD_ERR + +:BUILD_OK + + copy ..\..\lib\vc\hbwin32prn.lib ..\..\lib\*.* >nul + goto EXIT + +:BUILD_ERR + + notepad make_vc.log + +:EXIT + diff --git a/harbour/contrib/win32prn/makefile.vc b/harbour/contrib/win32prn/makefile.vc new file mode 100644 index 0000000000..9f1d10cdac --- /dev/null +++ b/harbour/contrib/win32prn/makefile.vc @@ -0,0 +1,141 @@ +# +# $Id$ +# + +# +# Makefile for Harbour Project for Microsoft Visual C (32 bits) +# + +# +# NOTE: You can use these envvars to configure the make process: +# (note that these are all optional) +# +# CFLAGS - Extra C compiler options for libraries and for +# executables +# C_USR - Extra C compiler options for libraries and for +# executables (GNU make compatible envvar) +# CLIBFLAGS - Extra C compiler options for the libraries +# HARBOURFLAGS - Extra Harbour compiler options +# PRG_USR - Extra Harbour compiler options +# (GNU make compatible envvar) +# + +# +# Notes about this makefile: +# +# 1. To add new files to a dependancy list, add an obj name to one of the +# OBJ lists for the appropriate library. +# NOTE: put .prg related obj's last in the lib list. +# +# 2. This is a recursive script. If you change the name of this file, +# be sure to change MK_FILE (a few lines down) to the new name as well. +# +# 3. Recurrsion rules are quite simple: +# If you specifiy /a on the command line, files in the obj\vc dir +# will be deleted, and when nmake recurses, it's without the /a flag +# +# If a .prg.obj rule is fired, nmake will execute this script with +# a specific target as a parameter immediatley after compiling a given +# set of prg files. +# ie: Harbour $< +# nmake /fmakefile.vc obj\vc\rtl.lib2 +# which will simply get make to re-evaluate the dependancy list for the +# lib, and as a result, it will execute the C compiler using the .c.obj +# rule below to create the obj's for the prg's that were created just +# prior to the recurrsive call. Once the obj's are created, the +# recurrsion is complete. +# See additional notes under RTL.LIB below. +# + +MK_FILE = makefile.vc +MK_FLAGS = $(MAKEFLAGS: =) + +OBJ_DIR = ..\..\obj\vc +LIB_DIR = ..\..\lib\vc +BIN_DIR = ..\..\bin + +# +# Directory macros. These should never have to change. +# + +INCLUDE_DIR = ..\..\include +TOOLS_DIR = . + +# +# C compiler definition and C flags. These should never have to change. +# + +AS = masm +CFLAGS = -I$(INCLUDE_DIR) -TP -W3 -nologo $(C_USR) $(CFLAGS) +CLIBFLAGS = -c $(CFLAGS) $(CLIBFLAGS) +CLIBFLAGSDEBUG = -Zi $(CLIBFLAGS) +HARBOURFLAGS = -i$(INCLUDE_DIR) -n -q0 -w2 -es2 -gc0 $(PRG_USR) $(HARBOURFLAGS) +LDFLAGS = $(LDFLAGS) + +# +# Macros to access our library names +# + +TOOLS_LIB = $(LIB_DIR)\hbwin32prn.lib + +HARBOUR_EXE = $(BIN_DIR)\harbour.exe + +# +# Rules +# + +.SUFFIXES: .prg .lib .c .obj .asm + +# override builtin + +.c.obj:: + $(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $< + +# +# +# + +LIBLIST = \ + $(TOOLS_LIB) + +# +# TOOLS.LIB rules +# + +{$(TOOLS_DIR)}.c{$(OBJ_DIR)}.obj:: + $(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $< + +{$(TOOLS_DIR)}.prg{$(OBJ_DIR)}.obj:: + $(HARBOUR_EXE) $(HARBOURFLAGS) -o$(OBJ_DIR)\ $< + $(MAKE) -nologo /$(MK_FLAGS) /f$(MK_FILE) $(TOOLS_LIB)2 + +TOOLS_LIB_OBJS = \ + $(OBJ_DIR)\tprinter.obj \ + $(OBJ_DIR)\w32_papi.obj \ + \ + $(OBJ_DIR)\w32_pcls.obj \ + +# +# Our default target +# + + +all: \ + $(TOOLS_LIB) + +CLEAN: + -@if exist $(OBJ_DIR)\tprinter.* del $(OBJ_DIR)\tprinter.* + -@if exist $(OBJ_DIR)\w32_papi.* del $(OBJ_DIR)\w32_papi.* + -@if exist $(OBJ_DIR)\w32_pcls.* del $(OBJ_DIR)\w32_pcls.* + -@if exist $(TOOLS_LIB) del $(TOOLS_LIB) + +# +# Library dependencies and build rules +# + +$(TOOLS_LIB) : $(TOOLS_LIB_OBJS) + lib /out:$@ $** + +# dummy targets used for prg to c creation + +$(TOOLS_LIB)2 : $(TOOLS_LIB_OBJS)