# # Makefile.cfg template file for autoconf, for libsocket for DJGPP # # libsocket Copyright (C) 1997, 1998 by Indrek Mandre # libsocket Copyright (C) 1997-2000 by Richard Dawe # # This is a Unix-ish Makefile, not a DOS one. SHELL = /bin/sh # What am I? DIST_NAME = libsocket 0.8.0 DIST_DIRSTEM = ls080 # Are we cross-compiling? ifneq ($(COMSPEC),) CROSS_BUILD = 0 else CROSS_BUILD = 1 endif # Standard prefixes prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ datadir = @datadir@ infodir = @infodir@ includedir = @includedir@ libdir = @libdir@ # Non-standard prefixes, for installing misc docs contribdir = $(prefix)/contrib/$(DIST_DIRSTEM) # GNU compiler & tools' flags CC = @CC@ CFLAGS = @CFLAGS@ @DEBUGFLAGS@ @FEATUREFLAGS@ CXX = @CXX@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ AS = @AS@ AR = @AR@ RANLIB = @RANLIB@ STRIP = @STRIP@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_DATA = @INSTALL_DATA@ MAKEINFO = @MAKEINFO@ INSTALL_INFO = @INSTALL_INFO@ INFO = @INFO@ # Use DOS's type (if necessary) instead of GNU cat, so that textutils isn't # required - see config.in CAT = @CAT@ # Strip all symbols by default? LSCK_STRIPALL = @LSCK_STRIPALL@ # # Binutils detection - as (the assembler) from binutils 2.8.1 and 2.9.5.1 beta # handle the lcall mnemonic slightly differently. The assembly has # #ifdef/#else/#endif to ensure that it compiles without warnings. # # OK, this is a bit ugly, but we have no choice. Unfortunately, it means sed # is required to build libsocket. # GAS_VERSION := $(shell $(AS) --version | sed -n 's/^GNU assembler //p') GAS_MAJOR := \ $(shell echo $(GAS_VERSION) \ | sed -n 's/^\([0-9][0-9]*\).*/\1/p') GAS_MINOR := \ $(shell echo $(GAS_VERSION) \ | sed -n 's/^[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/p') GAS_MINORMINOR := \ $(shell echo $(GAS_VERSION) \ | sed -n 's/^[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/p') # Defaults for version numbers ifeq ($(GAS_MAJOR),) GAS_MAJOR := 0 endif ifeq ($(GAS_MINOR),) GAS_MINOR := 0 endif ifeq ($(GAS_MINORMINOR),) GAS_MINORMINOR := 0 endif # Pass defines as compiler switches CFLAGS += -DGAS_MAJOR=$(GAS_MAJOR) CFLAGS += -DGAS_MINOR=$(GAS_MINOR) CFLAGS += -DGAS_MINORMINOR=$(GAS_MINORMINOR)