Commit c92817ad authored by rswindell's avatar rswindell
Browse files

Added automatic OS-detection and macros for XPDEV and UIFC dirs.

parent 5b7a0a18
......@@ -6,7 +6,7 @@
# @format.tab-size 4, @format.use-tabs true #
# #
# Linux: gmake #
# FreeBSD: gmake os=freebsd #
# FreeBSD: gmake os=FreeBSD #
# #
# Optional build targets: dlls, utils, mono, all (default) #
#########################################################################
......@@ -19,9 +19,15 @@ USE_DIALOG = 1 # Comment out for stdio (uifcx) version
CC = gcc
SLASH = /
OFILE = o
EXEFILE =
UIFC = ../../uifc
XPDEV = ../../xpdev
ifeq ($(os),freebsd) # FreeBSD
ifndef $(os)
os = $(shell uname)
$(warning OS not specified on command line, setting to '$(os)'.)
endif
ifeq ($(os),FreeBSD) # FreeBSD
ODIR := gcc.freebsd
else # Linux
ODIR := gcc.linux
......@@ -31,7 +37,7 @@ LIBDIR := /usr/lib
DELETE = rm -f -v
OUTLIB = -o
CFLAGS := -I../../uifc -I../../xpdev -I/usr/local/include -I../ -D_THREAD_SAFE
CFLAGS := -I$(UIFC) -I$(XPDEV) -I/usr/local/include -I../ -D_THREAD_SAFE
LFLAGS := -L/usr/local/lib
......@@ -60,8 +66,8 @@ OBJS := $(OBJS) $(ODIR)$(SLASH)uifcd.$(OFILE)
endif
vpath %.c ..
vpath %.c ../../uifc
vpath %.c ../../xpdev
vpath %.c $(UIFC)
vpath %.c $(XPDEV)
# Implicit C Compile Rule for SCFG
$(ODIR)/%.o : %.c
......
......@@ -18,10 +18,12 @@ SLASH = \\
OFILE = obj
EXEFILE = .exe
ODIR = bcc.win32 # Executable output directory
CFLAGS = -M -I..;..\..\uifc;..\..\xpdev -g1
XPDEV = ..\..\xpdev
UIFC = ..\..\uifc
CFLAGS = -M -I..;$(UIFC);$(XPDEV) -g1
DELETE = echo y | del
.path.c = .;..;..\..\uifc;..\..\xpdev
.path.c = .;..;$(UIFC);$(XPDEV)
# Optional compile flags (disable banner, warnings and such)
CFLAGS = $(CFLAGS) -q -d -H -X- -w-csu -w-pch -w-ccc -w-rch -w-par -w-pro
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment