Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Makefile 1.99 KB
Newer Older
1
# Makefile
rswindell's avatar
rswindell committed
2 3 4 5 6 7 8 9 10 11

#########################################################################
# Makefile for Synchronet BBS Configuration Utility (SCFG)				#
# For use with Borland C++ Builder 5+ or Borland C++ 5.5 for Win32      #
# @format.tab-size 4													#
#########################################################################

# $Id$

# Macros
12
#DEBUG	=	1				# Comment out for release (non-debug) version
13
#USE_FLTK=	1
14
USE_UIFC32= 1
rswindell's avatar
rswindell committed
15 16 17 18 19
CC		=	bcc32
LD		=	ilink32
SLASH	=	\\
OFILE	=	obj
EXEFILE	=	.exe
20
EXEODIR	=	bcc.win32	# Executable output directory
21
XPDEV	=   	..\..\xpdev
22
UIFC	=	..\..\uifc
23 24
LIB	=	..\..\..\lib
INCLUDE	=	..\..\..\include
25
CFLAGS	=	-DSCFG -M -I..;$(UIFC);$(XPDEV) 
rswindell's avatar
rswindell committed
26 27
DELETE	=	echo y | del 

28
.path.c = .;..;$(UIFC);$(XPDEV)
29
.path.cpp = $(UIFC)
rswindell's avatar
rswindell committed
30

rswindell's avatar
rswindell committed
31 32 33 34
# Enable auto-dependency checking
.autodepend
.cacheautodepend	

rswindell's avatar
rswindell committed
35
# Optional compile flags (disable banner, warnings and such)
36
CFLAGS	=	$(CFLAGS) -q -d -H -X- -w-csu -w-pch -w-ccc -w-rch -w-par -w-pro -w-8004
rswindell's avatar
rswindell committed
37
#-w-aus
rswindell's avatar
rswindell committed
38 39 40 41 42

# Debug or release build?
!ifdef DEBUG
CFLAGS	=	$(CFLAGS) -v -Od -D_DEBUG 
LFLAGS	=	$(LFLAGS) -v
43
EXEODIR	=	$(EXEODIR).debug
rswindell's avatar
rswindell committed
44
!else
45
EXEODIR	=	$(EXEODIR).release
rswindell's avatar
rswindell committed
46
!endif
47
LIBODIR = 	$(EXEODIR)
rswindell's avatar
rswindell committed
48 49 50 51 52

# Cross platform/compiler definitions
!include targets.mk	# defines all targets
!include objects.mk	# defines $(OBJS)

53
!ifdef USE_UIFC32
54
OBJS = $(OBJS) $(EXEODIR)\uifc32.$(OFILE)
55 56
CFLAGS  =   $(CFLAGS) -DUSE_UIFC32
!else
57
OBJS = $(OBJS) $(EXEODIR)\uifc.$(OFILE)
58
!endif
rswindell's avatar
rswindell committed
59

60 61
!ifdef USE_FLTK
CFLAGS 	= $(CFLAGS) -DUSE_FLTK -I$(INCLUDE)\fltk
62
OBJS 	= $(OBJS) $(EXEODIR)\uifcfltk.$(OFILE) $(LIB)/fltk/win32/fltk.lib
63 64
!endif

rswindell's avatar
rswindell committed
65 66
# Implicit C Compile Rule for SCFG
.c.$(OFILE):
67
	@$(CC) $(CFLAGS) -n$(EXEODIR) -c $<
rswindell's avatar
rswindell committed
68

69
.cpp.$(OFILE):
70
	@$(CC) $(CFLAGS) -n$(EXEODIR) -c $<
71

rswindell's avatar
rswindell committed
72
# Create output directories if they don't exist
73 74
$(EXEODIR):
	@if not exist $(EXEODIR) mkdir $(EXEODIR)
rswindell's avatar
rswindell committed
75

76
$(MAKEHELP): makehelp.c
77
	@$(CC) -q -n$(EXEODIR) $?
rswindell's avatar
rswindell committed
78

79
$(SCFGHELP): $(OBJS) $(MAKEHELP)
80
	@$(MAKEHELP) $(EXEODIR)
rswindell's avatar
rswindell committed
81 82

# Monolithic SCFG executable Build Rule
83
$(SCFG): $(OBJS)
rswindell's avatar
rswindell committed
84 85
	@echo Linking $@
	@$(CC) $(CFLAGS) -e$@ $**