# # $Id$ # # # Makefile for Harbour Project for Borland C/C++ 3.x, 4.x, 5.x compilers # # # 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) # # # NOTE: "echo." intentionally used instead of "echo", to avoid conflicts # with external commands named echo. # CC = bcc32 AS = tasm32 BIN_DIR = ..\..\bin\b32 OBJ_DIR = ..\..\obj\b32 LIB_DIR = ..\..\lib\b32 # This is needed, otherwise the libs may overflow when # debug info is requested with -v -y ARFLAGS = /P32 !if !$d(BCC_NOOPTIM) CFLAGS = -O2 $(CFLAGS) !endif # # 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. # CFLAGS = -I$(INCLUDE_DIR) -d $(C_USR) $(CFLAGS) CLIBFLAGS = -c $(CFLAGS) $(CLIBFLAGS) CLIBFLAGSDEBUG = -v $(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)\hbwin32ddrw.lib HARBOUR_EXE = $(BIN_DIR)\harbour.exe # # Rules # # # TOOLS.LIB rules # TOOLS_LIB_OBJS = \ $(OBJ_DIR)\w32_ddrw.obj \ # # Our default target # all: \ $(TOOLS_LIB) \ # # Library dependencies and build rules # $(TOOLS_LIB) : $(TOOLS_LIB_OBJS) # # TOOLS.LIB dependencies # $(OBJ_DIR)\w32_ddrw.obj : $(TOOLS_DIR)\w32_ddrw.cpp $(CC) $(CLIBFLAGS) -o$@ $** tlib $(TOOLS_LIB) $(ARFLAGS) -+$@,,