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

Common.gmake 15 KB
Newer Older
deuce's avatar
deuce committed
1
# build/Common.gmake
2
# vi: tabstop=4
deuce's avatar
deuce committed
3
#
4
# Global build system setup file (for GNU Make and gcc)
deuce's avatar
deuce committed
5
#
6
# $Id: Common.gmake,v 1.112 2020/05/02 01:30:46 rswindell Exp $
deuce's avatar
deuce committed
7 8 9 10 11
#
#############################################################################
# @format.tab-size 4		(Plain Text/Source Code File Header)			#
# @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)			#
#																			#
12
# Copyright Rob Swindell - http://www.synchro.net/copyright.html			#
deuce's avatar
deuce committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
#																			#
# This program is free software; you can redistribute it and/or				#
# modify it under the terms of the GNU General Public License				#
# as published by the Free Software Foundation; either version 2			#
# of the License, or (at your option) any later version.					#
# See the GNU General Public License for more details: gpl.txt or			#
# http://www.fsf.org/copyleft/gpl.html										#
#																			#
# Anonymous FTP access to the most recent released source is available at	#
# ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	#
#																			#
# Anonymous CVS access to the development source and modification history	#
# is available at cvs.synchro.net:/cvsroot/sbbs, example:					#
# cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login				#
#     (just hit return, no password is necessary)							#
# cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		#
#																			#
# For Synchronet coding style and modification guidelines, see				#
# http://www.synchro.net/source.html										#
#																			#
# You are encouraged to submit any modifications (preferably in Unix diff	#
# format) via e-mail to mods@synchro.net									#
#																			#
# Note: If this box doesn't appear square, then you need to fix your tabs.	#
#############################################################################
#																			#
#############################################################################
#																			#
# Common macro setup for GNU make											#
#																			#
# Common Build Macros REQUIRED:												#
#  SRC_ROOT			- *MUST* be set to the src dir							#
deuce's avatar
deuce committed
45
#  3RDP_ROOT		- If not set, defaults to $(SRC_ROOT)/../3rdp			#
deuce's avatar
deuce committed
46 47 48
#																			#
# Common Build Macros Used:													#
#  DEBUG			- Create a debug build									#
deuce's avatar
deuce committed
49 50 51 52 53 54 55
#  PROFILE			- Generates binaries which generate gprof details		#
#					  (GCC/DEBUG only)										#
#  UPROFILE			- Generates binaries which generate profile-driven		#
#					  optimization data										#
#					  (GCC/DEBUG only)										#
#  GCOV				- Generates binaries that produce gcov data				#
#					  (GCC/DEBUG only)										#
deuce's avatar
deuce committed
56 57 58
#  RELEASE			- Create a release build								#
#					  (Mutually exclusive, if both are set, RELEASE 		#
#						is cleared)											#
deuce's avatar
deuce committed
59 60
#  USE_UPROFILE		- Builds using information generated by UPROFILE.		#
#					  (RELEASE builds only)									#
deuce's avatar
deuce committed
61
#  OBJPATH_SUFFIX	- Suffix appended to OBJPATH useful for compiling 		#
deuce's avatar
deuce committed
62
#					  different options of the same source file				#
63
#  STATIC			- Create a statically linked build if possible			#
deuce's avatar
deuce committed
64 65
#																			#
# Common Build Macros Defined:												#
deuce's avatar
deuce committed
66
#  DELETE			- Delete files (Preferrably verbose)					#
deuce's avatar
deuce committed
67
#  MTOBJODIR		- Object output dir										#
deuce's avatar
deuce committed
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
#  OBJODIR			- Object output dir										#
#  LIBODIR			- Library output dir									#
#  EXEODIR			- Executable output dir									#
#  DEBUG			- Set for debug builds									#
#  RELEASE			- Set for release builds								#
#					  One of DEBUG or RELEASE is always set!				#
#  QUIET			- Target command prefix to show/not show commands		#
#  					  (Toggled off by setting VERBOSE)						#
#  CFLAGS			- Common C and C++ compiler flags						#
#  CCFLAGS			- C specific compiler flags								#
#  CXXFLAGS			- C++ specific compiler flags							#
#  LDFLAGS			- Linker flags											#
#  CC				- C compiler											#
#  CXX				- C++ compiler											#
#  EXEFILE			- Executable file extension (Includes .)				#
#  OFILE			- Object file extension (Includes .)					#
#  SOFILE			- Shared object (DLL) file extension (Includes .)		#
#  LIBFILE			- Static library file extension (Include .)				#
#  LIBPREFIX		- Prefix to library filename							#
#  LIBS				- Library names	(Appropriate for dependencies)			#
#  LIB_LDFLAGS		- Libraries appropriate for link command-line usage		#
#  COMPILE_MSG		- Message saying a target is being compiled				#
#  DIRSEP			- The directory seperator this system likes most		#
#  VERSION			- Synchronet version number in MAJOR.MINOR format		#
#					  (Numeric ONLY)										#
deuce's avatar
deuce committed
93 94
#  OUTPUT			- Compiler flag specifying output filename				#
#  LOUTPUT			- Linker flag specifying output filename				#
rswindell's avatar
rswindell committed
95 96 97 98 99 100
#  XPDEV_SRC		- Path to xpdev lib source								#
#  UIFC_SRC			- Path to uifc lib source								#
#  CIOLIB_SRC		- Path to ciolib source									#
#  SMBLIB_SRC		- Path to smblib source									#
#  ENCODE_SRC	    - Path to encode lib source								#
#  HASH_SRC			- Path to hash lib source								#
deuce's avatar
deuce committed
101 102
#  MT_CFLAGS		- CFLAGS for building MT objects						#
#  MT_LDFLAGS		- LDFLAGS for linking MT targets						#
deuce's avatar
deuce committed
103 104
#  UL_PRE			- Use Library prefix (*nix is -l)						#
#  UL_SUF			- Use Library siffix (bcc is .lib)						#
deuce's avatar
deuce committed
105 106 107
#																			#
# Common Targets Defined:													#
#  Implicit C and C++ targets												#
108
#  "clean" target															#
deuce's avatar
deuce committed
109
#  Output directory targets													#
deuce's avatar
deuce committed
110 111
#																			#
#############################################################################
112

113 114 115 116 117 118 119
# Set SBBSEXEC (if SBBSCTRL is set)
ifdef SBBSCTRL
ifndef SBBSEXEC
SBBSEXEC:=$(SBBSCTRL)/../exec
endif
endif

120 121
# Set VERSION
ifndef VERSION
122
 VERSION	:=	3.17
123 124
endif

125 126 127 128
# Put local (optional) macro definitions in localdefs.mk
-include localdefs.mk
-include $(SRC_ROOT)/build/localdefs.mk

129 130 131
# Set DEBUG
ifdef DEBUG
 ifdef RELEASE
132
  $(error Both DEBUG and RELEASE are defined)
133 134 135 136 137 138 139 140 141
 endif
endif

ifndef DEBUG
 ifndef RELEASE
  DEBUG	:=	1
 endif
endif

deuce's avatar
deuce committed
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
ifdef DEBUG
 ifdef PROFILE
  CFLAGS	+=	-pg
  LDFLAGS	+=	-pg
 endif
 ifdef UPROFILE
  CFLAGS	+=	-fprofile-generate
  LDFLAGS	+=	-fprofile-generate
 endif
 ifdef GCOV
  CFLAGS	+=	-fprofile-arcs -ftest-coverage
  LDFLAGS	+=	-fprofile-arcs -ftest-coverage
 endif
else
 ifdef USE_UPROFILE
  CFLAGS	+=	-fprofile-use
  LDFLAGS	+=	-fprofile-use
 endif
endif

162 163 164 165 166 167 168
# VERBOSE/QUIET
ifndef VERBOSE
 QUIET	:=	@
endif

# Compiler-specific options
CFLAGS	+=	-MMD
169
CC		?=	gcc
170
CCPRE	?= ${shell if [ `echo __clang__ | $(CC) -E - | grep -v '^\#'` != __clang__ ] ; then echo clang ; elif [ `echo __INTEL_COMPILER | $(CC) -E - | grep -v '^\#'` != __INTEL_COMPILER ] ; then echo icc ; else echo gcc ; fi}
171 172 173 174 175 176 177 178 179
ifeq ($(CCPRE),clang)
 ifeq ($(CC),cc)
  CXX	:=	c++
 else
  ifeq ($(CC),clang)
   CXX	:=	clang++
  endif
 endif
endif
180 181 182 183 184
ifdef BUILD_DEPENDS
 CC				:=	$(SRC_ROOT)/build/mkdep -a
 CXX			:=	$(SRC_ROOT)/build/mkdep -a
 LD				:=	echo
 COMPILE_MSG	:=  Depending
185 186
 AR				:=	echo
 RANLIB			:=	echo
187 188 189 190
else
 CXX			?=	g++
 LD				?=	ld
 COMPILE_MSG	:= Compiling
191 192
 AR				?=	ar
 RANLIB			?=	ranlib
193
endif
deuce's avatar
deuce committed
194
WINDRES	?=	windres
195 196 197 198 199 200 201 202

ifdef DEBUG
 BUILD	=	debug
else
 BUILD	=	release
endif
BUILDPATH	?=	$(BUILD)

Deucе's avatar
Deucе committed
203
gcc_machine		:= $(findstring mingw32,$(shell ${CC} -dumpmachine))
204 205
ifeq ($(gcc_machine),mingw32)
 os		:= Win32
Deucе's avatar
Deucе committed
206 207 208
 CFLAGS	+=	-DMSVCRT_VERSION=0x0800 -m32
 LDFLAGS+=	-m32
 WINDRESFLAGS+=	-Fpe-i386
209 210
endif

211 212 213 214 215 216
# Get OS
ifndef os
 os		:=	$(shell uname)
endif
os      :=	$(shell echo $(os) | tr '[A-Z]' '[a-z]' | tr ' ' '_')

Deucе's avatar
Deucе committed
217
ifneq ($(os),win32)
218 219 220
 CFLAGS +=	-DPREFER_POLL
endif

221 222
machine		:=	$(shell if uname -m | egrep -v "(i[3456789]*|x)86" > /dev/null; then uname -m | tr "[A-Z]" "[a-z]" | tr " " "_" ; fi)
machine		:=	$(shell if uname -m | egrep "64" > /dev/null; then uname -m | tr "[A-Z]" "[a-z]" | tr " " "_" ; else echo $(machine) ; fi)
223
ifeq ($(os),darwin)
224 225 226 227 228
 ifeq ("$(machine)","")
  ifeq ($(shell sysctl hw.optional.x86_64),hw.optional.x86_64: 1)
   machine	:= x86_64
  endif
 endif
229 230
endif

231
ifeq ($(machine),x86_64)
232
 machine	:= x64
233
endif
234
CFLAGS +=	-fpic
deuce's avatar
deuce committed
235 236 237
ifeq ($(machine),sparc64)
 CFLAGS +=      -D__BIG_ENDIAN__
endif
238 239 240
ifeq ($(machine),sun4u)
 CFLAGS +=      -D__BIG_ENDIAN__
endif
241 242 243
ifeq ($(machine),power_macintosh)
 CFLAGS +=      -D__BIG_ENDIAN__
endif
deuce's avatar
deuce committed
244 245 246
ifeq ($(machine),mac68k)
 CFLAGS +=      -D__BIG_ENDIAN__
endif
247 248 249 250 251 252
ifeq ($(machine),)
 machine	:=	$(os)
else
 machine	:=	$(os).$(machine)
endif

253 254
ifeq ($(shell if [ -f /usr/include/inttypes.h ] ; then echo YES ; fi),YES)
 CFLAGS	+=	-DHAS_INTTYPES_H
255 256 257
else
 ifeq ($(shell if [ -f /boot/develop/headers/posix/inttypes.h ] ; then echo YES ; fi),YES)
  CFLAGS	+=	-DHAS_INTTYPES_H
deuce's avatar
deuce committed
258 259 260 261
 else
  ifeq ($(os),darwin)	# Don't go digging for stuff on Mac, nobody knows what's up.
   CFLAGS	+=	-DHAS_INTTYPES_H
  endif
262
 endif
263 264
endif

265
CCPRE := $(lastword $(subst /, ,$(CCPRE)))
266 267 268
ifeq ($(CCPRE),clang)
 CFLAGS += -Wno-invalid-source-encoding
endif
269
LIBODIR :=	$(CCPRE).$(machine).lib.$(BUILDPATH)
deuce's avatar
deuce committed
270 271
OBJODIR :=	$(CCPRE).$(machine).obj.$(BUILDPATH)
MTOBJODIR :=	$(CCPRE).$(machine).obj.$(BUILDPATH)-mt
272 273 274
EXEODIR :=	$(CCPRE).$(machine).exe.$(BUILDPATH)
LDFLAGS	+=	-L$(LIBODIR)

deuce's avatar
deuce committed
275
ifeq ($(os),openbsd)
276 277
 DELETE :=	rm -f
else
deuce's avatar
deuce committed
278
 ifeq ($(os),sunos)
279 280
  DELETE :=	rm -f
 else
281
  DELETE	=	rm -f
282 283 284 285 286 287
 endif
endif

LIBPREFIX	:= lib
DIRSEP		:= /
OFILE		:= .o
288 289 290 291 292
ifeq ($(os),win32)
 EXEFILE		:= .exe
else
 EXEFILE		:=
endif
293 294
SOFILE		:= .so
LIBFILE		:= .a
deuce's avatar
deuce committed
295 296
UL_PRE		:=	-l
UL_SUF		:=	
297

deuce's avatar
deuce committed
298 299 300
OUTPUT		:=	-o
LOUTPUT		:=	-o

301 302 303 304 305
ifdef STATIC
 LDFLAGS	+=	-static
 CFLAGS		+=	-DSTATIC_LINK
endif

306
ifeq ($(os),openbsd)
deuce's avatar
deuce committed
307
 SOFILE	:=	$(SOFILE).$(VERSION)
308 309 310
else
 ifeq ($(os),darwin)
  SOFILE =	.dylib
deuce's avatar
deuce committed
311
  RANLIB +=	-s
312 313 314 315
 endif
endif

# OS Specific Flags
316
ifeq ($(os),sunos)    # Solaris CFLAGS	+= -D__solaris__ -DNEEDS_DAEMON -DNEEDS_FORKPTY -DNEEDS_CFMAKERAW # Solaris 10 provides setenv()
317
 ifeq ($(shell if [ `uname -r | sed 's/\.//'` -lt 510 ] ; then echo "Yes" ; else echo "No" ; fi),Yes)
318 319
  CFLAGS += -DNEEDS_SETENV
 endif
320
 LDFLAGS	+=	-L/opt/sfw/lib
321 322
endif
ifeq ($(os),netbsd)	# NetBSD
323
 CFLAGS	+=	-D__unix__ -I/usr/pkg/include
324
endif
deuce's avatar
deuce committed
325
ifeq ($(os),haiku)
deuce's avatar
deuce committed
326
 CFLAGS	+=	-D__unix__ -DNEEDS_FORKPTY
deuce's avatar
deuce committed
327
endif
328
ifeq ($(os),darwin)
329
 MIN_MAC_OSX_VERSION = 10.6
330
 CFLAGS +=  -D__unix__ -fno-common -D__DARWIN__
rswindell's avatar
rswindell committed
331 332
 CFLAGS +=  -mmacosx-version-min=$(MIN_MAC_OSX_VERSION)
 LDFLAGS += -mmacosx-version-min=$(MIN_MAC_OSX_VERSION)
333 334
endif

deuce's avatar
deuce committed
335 336
# PThread-specific flags
ifeq ($(os),linux)    # Linux
337
 CFLAGS	+=	-DPOSIX_C_SOURCE=200809L -D_DEFAULT_SOURCE -D_BSD_SOURCE -DSPEED_MACROS_ONLY -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
338 339
 ifndef THREADS_ACTUALLY_WORK
  CFLAGS    += -D_THREAD_SUID_BROKEN
deuce's avatar
deuce committed
340 341
 endif
endif
deuce's avatar
deuce committed
342
MT_CFLAGS    += -D_THREAD_SAFE -D_REENTRANT
deuce's avatar
deuce committed
343
ifeq ($(os),freebsd)    # FreeBSD
344
 MT_CFLAGS    += -DUSE_XP_SEMAPHORES
deuce's avatar
deuce committed
345
 MT_LDFLAGS    +=    -pthread
346
 LDFLAGS    +=    -pthread
deuce's avatar
deuce committed
347 348 349
 XP_SEM    :=    1
else
 ifeq ($(os),openbsd)    # OpenBSD
350
  MT_CFLAGS    += -DUSE_XP_SEMAPHORES
deuce's avatar
deuce committed
351
  MT_LDFLAGS    +=    -pthread
352
  LDFLAGS    +=    -pthread
deuce's avatar
deuce committed
353 354 355
  XP_SEM    :=    1
 else
  ifeq ($(os),netbsd)    # NetBSD
356
   MT_CFLAGS	+=	-DUSE_XP_SEMAPHORES
357
   MT_LDFLAGS    +=   -L/usr/pkg/lib
deuce's avatar
deuce committed
358 359 360 361 362
   XP_SEM    :=    1
  else
   ifeq ($(os),qnx)    # QNX
   else
    ifeq ($(os),darwin)    # Darwin/Mac OS X
363 364
     CFLAGS    += -D__unix__ 
     MT_CFLAGS    += -DUSE_XP_SEMAPHORES -D__DARWIN__
deuce's avatar
deuce committed
365 366 367 368
     XP_SEM    := 1
    else
     ifeq ($(os),sunos)  # Solaris
      XP_SEM :=    1
deuce's avatar
deuce committed
369
      MT_CFLAGS    +=    -D_POSIX_PTHREAD_SEMANTICS
370
      MT_CFLAGS    += -DUSE_XP_SEMAPHORES
371
      # This makes ctime_r() be the correct one.
372
      #CFLAGS	   += -D_POSIX_PTHREAD_SEMANTICS
373 374
     else
      ifeq ($(os),win32) # Windows
375
       CFLAGS		+= -U__STRICT_ANSI__ -D_WIN32 -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -D_WIN32_IE=0x0500
376 377 378 379 380
       MT_CFLAGS	+= -D_WIN32
      else           # Linux / Other UNIX
       XP_SEM :=    1
       MT_CFLAGS    += -DUSE_XP_SEMAPHORES
      endif
deuce's avatar
deuce committed
381 382 383 384 385 386 387
     endif
    endif
   endif
  endif
 endif
endif

388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403
SHLIBOPTS   :=  -shared
ifeq ($(os),darwin)
 MKSHLIB        :=  libtool -dynamic -framework System -lcc_dynamic
 MKSHPPLIB      :=  libtool -dynamic -framework System -lcc_dynamic -lstdc++
 SHLIBOPTS  :=
else
 ifeq ($(os),sunos)
  MKSHLIB       :=  /usr/ccs/bin/ld -G
  MKSHPPLIB     :=  /usr/ccs/bin/ld -G
  SHLIBOPTS :=
 else
  MKSHLIB       :=  $(CC)
  MKSHPPLIB     :=  $(CXX)
 endif
endif

deuce's avatar
deuce committed
404 405 406 407 408
# Paths
XPDEV_SRC	:=	$(SRC_ROOT)$(DIRSEP)xpdev
CIOLIB_SRC	:=	$(SRC_ROOT)$(DIRSEP)conio
SMBLIB_SRC	:=	$(SRC_ROOT)$(DIRSEP)smblib
UIFC_SRC	:=	$(SRC_ROOT)$(DIRSEP)uifc
rswindell's avatar
rswindell committed
409 410
ENCODE_SRC	:=	$(SRC_ROOT)$(DIRSEP)encode
HASH_SRC 	:=	$(SRC_ROOT)$(DIRSEP)hash
deuce's avatar
deuce committed
411 412
3RDP_ROOT	?=	$(SRC_ROOT)$(DIRSEP)..$(DIRSEP)3rdp
3RDP_BUILD	:=	$(3RDP_ROOT)$(DIRSEP)build
deuce's avatar
deuce committed
413

deuce's avatar
deuce committed
414
# SDL ciolib enabled by default for the moment.
deuce's avatar
deuce committed
415
ifndef WITHOUT_SDL
deuce's avatar
deuce committed
416
 USE_SDL	:=	1
417 418
endif

deuce's avatar
deuce committed
419
# Pull in lib-specific flags
420
-include		$(XPDEV_SRC)$(DIRSEP)Common.make
deuce's avatar
deuce committed
421 422 423 424
-include		$(XPDEV_SRC)$(DIRSEP)Common.gmake
-include		$(SMBLIB_SRC)$(DIRSEP)Common.make
-include		$(SMBLIB_SRC)$(DIRSEP)Common.gmake
-include		$(CIOLIB_SRC)$(DIRSEP)Common.make
425
-include		$(CIOLIB_SRC)$(DIRSEP)Common.gmake
deuce's avatar
deuce committed
426
-include		$(UIFC_SRC)$(DIRSEP)Common.make
427
-include		$(UIFC_SRC)$(DIRSEP)Common.gmake
rswindell's avatar
rswindell committed
428 429 430 431
-include		$(ENCODE_SRC)$(DIRSEP)Common.make
-include		$(ENCODE_SRC)$(DIRSEP)Common.gmake
-include		$(HASH_SRC)$(DIRSEP)Common.make
-include		$(HASH_SRC)$(DIRSEP)Common.gmake
deuce's avatar
deuce committed
432 433
-include		$(3RDP_BUILD)$(DIRSEP)Common.make
-include		$(3RDP_BUILD)$(DIRSEP)Common.gmake
deuce's avatar
deuce committed
434

435 436 437
ifdef DEBUG
 CFLAGS	+=	-ggdb
 CFLAGS	+=	-D_DEBUG
438
 CFLAGS +=	-Wall -Wno-char-subscripts
439
else # RELEASE
Deucе's avatar
Deucе committed
440 441 442
 # -finline-functions (used to) break the baja build badly.
 # This also meant that -O3 wouldn't work either.
 CFLAGS	:= -O3 -fomit-frame-pointer -ffast-math -funroll-loops $(CFLAGS)
443 444 445
endif

-include targets.mk
446
-include $(SRC_ROOT)/build/rules.mk
447 448 449
-include objects.mk		# defines $(OBJS)

# Implicit C Compile Rule
450
$(OBJODIR)/%$(OFILE) : %.c $(BUILD_DEPENDS) | $(OBJODIR)
451
	@echo $(COMPILE_MSG) $<
452
	$(QUIET)$(CC) -std=c99 $(CFLAGS) $(CCFLAGS) -o $@ -c $<
453 454

# Implicit C++ Compile Rule
455
$(OBJODIR)/%$(OFILE) : %.cpp $(BUILD_DEPENDS) | $(OBJODIR)
456
	@echo $(COMPILE_MSG) $<
Rob Swindell's avatar
Rob Swindell committed
457
	$(QUIET)$(CXX) -std=c++11 $(CFLAGS) $(CXXFLAGS) -o $@ -c $<
458

deuce's avatar
deuce committed
459
# Implicit MT C Compile Rule
460
$(MTOBJODIR)/%$(OFILE) : %.c $(BUILD_DEPENDS) | $(MTOBJODIR)
deuce's avatar
deuce committed
461
	@echo $(COMPILE_MSG) $<
462
	$(QUIET)$(CC) -std=c99 $(CFLAGS) $(CCFLAGS) $(MT_CFLAGS) -o $@ -c $<
deuce's avatar
deuce committed
463 464

# Implicit MT C++ Compile Rule
465
$(MTOBJODIR)/%$(OFILE) : %.cpp $(BUILD_DEPENDS) | $(MTOBJODIR)
deuce's avatar
deuce committed
466
	@echo $(COMPILE_MSG) $<
Rob Swindell's avatar
Rob Swindell committed
467
	$(QUIET)$(CXX) -std=c++11 $(CFLAGS) $(CXXFLAGS) $(MT_CFLAGS) -o $@ -c $<
deuce's avatar
deuce committed
468

469 470
depend:
	$(QUIET)$(DELETE) $(OBJODIR)/.depend
deuce's avatar
deuce committed
471
	$(QUIET)$(DELETE) $(MTOBJODIR)/.depend
472 473 474 475 476 477
	$(QUIET)$(DELETE) $(LIBODIR)/.depend
	$(QUIET)$(DELETE) $(EXEODIR)/.depend
	$(QUIET)$(MAKE) BUILD_DEPENDS=FORCE

FORCE:

deuce's avatar
deuce committed
478
-include $(MTOBJODIR)/.depend
479 480 481
-include $(OBJODIR)/.depend
-include $(LIBODIR)/.depend
-include $(EXEODIR)/.depend
deuce's avatar
deuce committed
482
-include $(MTOBJODIR)/*.d
483 484 485
-include $(OBJODIR)/*.d
-include $(LIBODIR)/*.d
-include $(EXEODIR)/*.d
486

deuce's avatar
deuce committed
487 488
$(XPDEV_LIB): xpdev
xpdev:
489 490
	$(MAKE) -C $(XPDEV_SRC) lib

deuce's avatar
deuce committed
491 492
$(XPDEV-MT_LIB): xpdev-mt
xpdev-mt:
493 494
	$(MAKE) -C $(XPDEV_SRC) mtlib

rswindell's avatar
rswindell committed
495 496 497 498 499 500 501 502
$(ENCODE_LIB): encode
encode:
	$(MAKE) -C $(ENCODE_SRC) lib

$(HASH_LIB): hash
hash:
	$(MAKE) -C $(HASH_SRC) lib

deuce's avatar
deuce committed
503 504
$(SMBLIB): smblib
smblib:
505 506
	$(MAKE) -C $(SMBLIB_SRC) lib

507
$(CIOLIB-MT): ciolib-mt
deuce's avatar
deuce committed
508
ciolib-mt:
509 510
	$(MAKE) -C $(CIOLIB_SRC) mtlib

511
$(UIFCLIB): uifc
deuce's avatar
deuce committed
512
uifc:
deuce's avatar
deuce committed
513
	$(MAKE) -C $(UIFC_SRC) lib
514

515 516
$(UIFCLIB-MT): uifc-mt
uifc-mt:
deuce's avatar
deuce committed
517
	$(MAKE) -C $(UIFC_SRC) mtlib
deuce's avatar
deuce committed
518 519 520

$(JS_LIB):  $(JS_DEPS)
js:
deuce's avatar
deuce committed
521 522 523 524 525
	$(MAKE) -C $(3RDPBUILDDIR) jslib

$(CRYPT_LIB):  $(CRYPT_DEPS)
cl:
	$(MAKE) -C $(3RDPBUILDDIR) cryptlib
rswindell's avatar
rswindell committed
526