diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 77554a268e..67e7943552 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,6 @@ +19990515-10:20 CET Eddie Runia + * tests/working/*.bat make and build files added + 19990514-20:10 EDT David G. Holm * source/rtl/strcmp.c - Added SET EXACT ON rules for null strings and trailing spaces. diff --git a/harbour/tests/tests.mk b/harbour/tests/tests.mk new file mode 100644 index 0000000000..f6c1ee4b0f --- /dev/null +++ b/harbour/tests/tests.mk @@ -0,0 +1,31 @@ +# compiler macros +CC=gcc +CFLAGS=-Wall -g -DDEBUG -DNO_OBJ -I$(INCLUDE_DIR) -L$(LIB_DIR) -x c +CFLAGS1=-Wall -g -DDEBUG -DNO_OBJ -I$(INCLUDE_DIR) -L$(LIB_DIR) + +# directory macros - define the LIB_DIR for you +INCLUDE_DIR=../../INCLUDE/ +BIN_DIR=../../bin +LIB_DIR=../../LIBS/WIN32 + +# makefile macros +OBJECTS=$(SRCS:.PRG=.o) +COMPILE.C=$(COMPILE.c) + +# default targets + +all: + +clean: + -rm -Rf $(BINARY) core *~ y_tab.* lexyy.c y.output *.o *.exe + +.prg.c: + $(BIN_DIR)/harbour $? /N + +.PRG.c: + $(BIN_DIR)/harbour $? /N + +.o.exe: + $(CC) $(CFLAGS1) -o $@ $? -lharbour + +.SUFFIXES: .prg .PRG .exe .EXE diff --git a/harbour/tests/working/bld32w.bat b/harbour/tests/working/bld32w.bat new file mode 100644 index 0000000000..fdf87a5aaa --- /dev/null +++ b/harbour/tests/working/bld32w.bat @@ -0,0 +1,18 @@ +@echo off + +IF A%1 == A GOTO :SINTAX +IF A%2 == A GOTO :NOOUTPUT + +bcc32 -O2 -e%2.exe -DWINDOWS -tW -I..\..\include ..\..\source\vm\hvm.c %1.c ..\..\libs\b32\harbour.lib ..\..\libs\win32\terminal.lib +GOTO :END + +:NOOUTPUT +bcc32 -O2 -e%1.exe -DWINDOWS -tW -I..\..\include ..\..\source\vm\hvm.c %1.c ..\..\libs\b32\harbour.lib ..\..\libs\win32\terminal.lib +GOTO :END + +:SINTAX +ECHO syntax: BuildExe Harbour_Output_Filename [Exe_Output_Filename] +ECHO Use Harbour_Output_Filename and Exe_Output_Filename without extensions +ECHO\ + +:END diff --git a/harbour/tests/working/buildvc.bat b/harbour/tests/working/buildvc.bat new file mode 100644 index 0000000000..c3d6756030 --- /dev/null +++ b/harbour/tests/working/buildvc.bat @@ -0,0 +1 @@ +nmake /f makefile.vc diff --git a/harbour/tests/working/hb32w.bat b/harbour/tests/working/hb32w.bat new file mode 100644 index 0000000000..b94b066546 --- /dev/null +++ b/harbour/tests/working/hb32w.bat @@ -0,0 +1,10 @@ +@echo off + +REM From .PRG to .C = Harbour +..\..\bin\harbour %1.prg /n +if errorlevel 1 goto end + +REM From .C to .EXE = BuildExe +call BLD32W %1 %2 + +:end diff --git a/harbour/tests/working/hbvc.bat b/harbour/tests/working/hbvc.bat new file mode 100644 index 0000000000..130c7e491a --- /dev/null +++ b/harbour/tests/working/hbvc.bat @@ -0,0 +1,7 @@ +@echo off + +REM From .PRG to .C = Harbour +..\..\bin\harbour %1.prg /n + +REM From .C to .EXE = BuildExe +call BLDVCEXE %1 %2 diff --git a/harbour/tests/working/makefile.gcc b/harbour/tests/working/makefile.gcc new file mode 100644 index 0000000000..0164029485 --- /dev/null +++ b/harbour/tests/working/makefile.gcc @@ -0,0 +1,12 @@ +# Tell emacs that this is a -*- makefile -*- + +include ../tests.mk + +PRGS:= $(wildcard *.PRG) + +OBJS= $(PRGS:.PRG=.o) +EXES= $(PRGS:.PRG=.exe) + +all: $(EXES) + + diff --git a/harbour/tests/working/makefile.wat b/harbour/tests/working/makefile.wat new file mode 100644 index 0000000000..6060699e16 --- /dev/null +++ b/harbour/tests/working/makefile.wat @@ -0,0 +1,26 @@ +# Makefile for WATCOM C/C++ 10.x +# +!ifdef FILE +!include ..\..\makewat.env + +all: $(FILE).exe + +$(FILE).exe : $(FILE).obj $(HARBOURDIR)\bin\harbour.exe + %create link.tmp + %append link.tmp $(WLDEBUG) + %append link.tmp FI $(FILE) + %append link.tmp NAME $(FILE) + %append link.tmp LIBRARY $(WLLIBS) + %append link.tmp $(WLOPTIONS) + %append link.tmp $(WLSTACK) + wlink @link.tmp + +$(FILE).c : $(FILE).prg + $(HARBOURDIR)\bin\harbour $(FILE) -n + +!else +dummy : .SYMBOLIC + @echo ============================================================= + @echo Please give a name of PRG file to compile (without extension) + @echo wmake /f makefile.wat FILE=codebloc +!endif \ No newline at end of file