# # Set to 1 if you want to compile for your platform # NATIVE = 0 NETBSD = 0 # # Path to the Heirloom Bourne shell. It is used during compilation # as well as by the package commands. # SHELL = /bin/sh # # A BSD-compatible install command. # INSTALL=/usr/bin/install # # Where the Heirloom Development Tools package has been placed. # $(CCSDIR)/bin must also be in the PATH setting when building. # CCSDIR=$(SYS_ROOT)/usr/ccs # # Prefixes. # PREFIX=/usr VAR=/var # # Where to place binaries. This must be the same place # where the Heirloom Toolchest binaries are installed. # BINDIR=$(PREFIX)/bin # # Where to place superuser-only binaries. This may be # the same place as the binary directory. # SBINDIR=$(PREFIX)/sbin # # Where to place configuration files. # ETCDIR=/etc # # Where to place (read-only) helper files. # SADMDIR=$(PREFIX)/sadm # # Where to place the database of installed packages. # VSADMDIR=$(VAR)/sadm # # Where to place manual pages. # MANDIR=$(PREFIX)/share/man # # Binaries are stripped with this command after installation. # STRIP=strip -s -R .comment -R .note # # SYS_ROOT stuff # ifeq ($(NATIVE),0) CC=$(MUSL_GCC_ROOT)/usr/bin/$(ARCH)-linux-musl-gcc CPP=$(MUSL_GCC_ROOT)/usr/bin/$(ARCH)-linux-musl-gcc -E LD=$(MUSL_GCC_ROOT)/usr/bin/$(ARCH)-linux-musl-ld AR=$(MUSL_GCC_ROOT)/usr/bin/$(ARCH)-linux-musl-ar else CC=gcc CPP=gcc -E LD=ld AR=ar endif # # Compiler flags. # ifeq ($(NATIVE),0) CFLAGS=-O2 --sysroot=$(SYS_ROOT) else CFLAGS= endif # # C preprocessor flags. # # Use -D_GNU_SOURCE for Linux with GNU libc. # Use -D_INCLUDE__STDC_A1_SOURCE for HP-UX. # ifeq ($(NATIVE),0) CPPFLAGS=-D_GNU_SOURCE -Ddaddr_t=uint64_t -DMAX_INPUT=4096 -DMAX_CANON=4096 else CPPFLAGS=-D_GNU_SOURCE -DMAX_INPUT=4096 -DMAX_CANON=4096 -DNO_STROPTS endif # # Warning flags for the compiler. # #WARN= # # Linker flags. # ifeq ($(NATIVE),0) LDFLAGS=--sysroot=$(SYS_ROOT) else LDFLAGS= endif # # Additional libraries to link with. # ifeq ($(NETBSD),0) LIBS= else LIBS=-lintl endif # # It may be necessary to define AR on some systems, e.g. on HP-UX. # #AR=ar # # Run ranlib if it is in the current path. This should take care # of most situations. On Mac OS X, you need to uncomment "ranlib -c". # RANLIB=(hash ranlib) >/dev/null 2>&1 || exit 0; ranlib #RANLIB=ranlib -c # # Use this if you prefer hard links between installed files. # LNS = ln -s # # Do not modify anything below here. # PATHS = \ -DSHELL='"$(SHELL)"' \ -DETCDIR='"$(ETCDIR)"' \ -DBINDIR='"$(BINDIR)"' \ -DSBINDIR='"$(SBINDIR)"' \ -DSADMDIR='"$(SADMDIR)"' \ -DVSADMDIR='"$(VSADMDIR)"' \ -DVSADMREL='"$(VSADMDIR:/%=%)"'