# # Set to 1 if you want to compile for your platform # NATIVE = 0 # # This is the shell used for the compilation phase and the default shell # for the traditional variant of the "make" utility built. It needs not # conform to POSIX. The system shell should work fine; for maximum # compatibility with traditional tools, the Heirloom Bourne shell is # recommended. It then must obviously be compiled and installed first. # SHELL = /bin/sh # # Specify the path name for a POSIX-conforming shell here. For example, # Solaris users should insert /usr/xpg4/bin/sh. This shell is used as # default shell for the POSIX variant of the "make" utility built. # POSIX_SHELL = /bin/sh # # A BSD-compatible install command. # INSTALL=/usr/bin/install # # Prefix. # PREFIX=/usr/ccs # # Where to place binaries. # BINDIR=$(PREFIX)/bin # # Where to place additional binaries that aim at POSIX conformance. # SUSBIN=/usr/posix/bin # # Where to place libraries. # LIBDIR=$(PREFIX)/lib # # 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 CXX=$(MUSL_GCC_ROOT)/usr/bin/$(ARCH)-linux-musl-g++ 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 CXX=g++ CPP=gcc -E LD=ld AR=ar endif # # Compiler flags. # ifeq ($(NATIVE),0) CFLAGS=-O2 --sysroot=$(SYS_ROOT) CXXFLAGS=-O2 --sysroot=$(SYS_ROOT) else CFLAGS=-O2 CXXFLAGS=-O2 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 else CPPFLAGS=-D_GNU_SOURCE -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. # LIBS= # # 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 the generated yacc to process .y files. You can set this to another # value for cross-compiling. # YACC=`test -x ../yacc/yacc && echo ../yacc/yacc -P../yacc/yaccpar || echo yacc` # # Use this if you prefer hard links between installed files. # LNS = ln -s