From ede3a4c220a9b423549d7f0d6a1f0543aacf8d41 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Fri, 26 Apr 2002 23:43:14 +0000 Subject: [PATCH] Initial support for Borland C++ for Linux (Kylix 3) --- src/xpdev/GNUmakefile | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/src/xpdev/GNUmakefile b/src/xpdev/GNUmakefile index 50cb9ef265..4e595735bf 100644 --- a/src/xpdev/GNUmakefile +++ b/src/xpdev/GNUmakefile @@ -2,27 +2,38 @@ ######################################################################### # Makefile for cross-platform development "wrappers" test # -# For use with GNU make and GNU C Compiler # +# For use with GNU make and GNU C Compiler or Borland C++ (Kylix 3) +# # @format.tab-size 4, @format.use-tabs true # # # -# usage: gmake [os=target_os] # +# usage: gmake [os=target_os] [bcc=1] +# ######################################################################### # $Id$ # Macros DEBUG = 1 # Comment out for release (non-debug) version -CC = gcc +ifdef bcc +CC = bc++ +CFLAGS = -w -D__unix__ +else +CC = gcc +CFLAGS = -Wall -O +endif SLASH = / OFILE = o -CFLAGS = -Wall ifndef $(os) os = $(shell uname) $(warning OS not specified on command line, setting to '$(os)'.) endif +ifdef bcc +ODIR := bcc.$(os) +else ODIR := gcc.$(os) +endif DELETE = rm -fv @@ -30,11 +41,20 @@ ifeq ($(os),FreeBSD) # FreeBSD CFLAGS += -D_THREAD_SAFE LFLAGS := -pthread else # Linux / Other UNIX +ifdef bcc +LFLAGS := libpthread.a +else LFLAGS := -lpthread endif +endif ifdef DEBUG -CFLAGS += -g -O0 -D_DEBUG +ifdef bcc +CFLAGS += -v -y +else +CFLAGS += -g +endif +CFLAGS += -D_DEBUG ODIR := $(ODIR).debug else # RELEASE ODIR := $(ODIR).release @@ -46,7 +66,7 @@ include targets.mk # defines all and clean targets # Implicit C Compile Rule $(ODIR)/%.o : %.c @echo Compiling $< - @$(CC) $(CFLAGS) -c $< -o $@ + @$(CC) $(CFLAGS) -c $< -o$@ # Create output directories $(ODIR): @@ -55,5 +75,5 @@ $(ODIR): # Executable Build Rule $(WRAPTEST): $(ODIR)/wraptest.o $(OBJS) @echo Linking $@ - @$(CC) $(LFLAGS) $^ -o $@ + @$(CC) $(LFLAGS) $^ -o$@ -- GitLab