# tools/Makefile.bsd-clang # # WARNING: This makefile _requires_ the use of GNU make. BSD make is not # supported and _will_ _not_ be supported, so don't bother asking. EDITLINE_DEFS = -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE \ -DUSE_DIRENT -DSYS_UNIX EDITLINE_CC = clang EDITLINE_CFLAGS = "$(EDITLINE_DEFS) -g" EDITLINE_RANLIB = ranlib EDITLINE_MAKECMD = \ gmake CC=$(EDITLINE_CC) CFLAGS=$(EDITLINE_CFLAGS) RANLIB=$(EDITLINE_RANLIB) # # We build libedit on all versions of BSD # BSD_TOOLS = unix/src/editline/libedit.a # # On OpenBSD, we build xdr_hyper.o as well. # BSD_UNAME := $(shell uname -s) ifeq ($(BSD_UNAME),OpenBSD) BSD_TOOLS += xdr_hyper.o endif # # Now state the build rules. # all: ../libMx/mx_private_version.h mx_config ${BSD_TOOLS} cJSON.o include ../libMx/Makefile.version include ../libMx/Makehead.bsd-clang # Get the Subversion revision number of MX (if available). include Include.subversion #------------------------------------------------------------------------ mx_clean: -rm *.o mx_private_version mx_config mx_revision.txt ( cd unix/src/editline ; gmake clean ) mx_private_version: ../libMx/Makefile.version version/src/mx_private_version.c $(CC) $(CFLAGS_MX_VERS) -o mx_private_version \ version/src/mx_private_version.c ../libMx/mx_private_version.h: mx_private_version ./mx_private_version > ../libMx/mx_private_version.h mx_config: version/src/mx_config.c ../libMx/mx_private_version.h $(CC) -I../libMx -DOS_BSD -DMX_ARCH="\"$(MX_ARCH)\"" \ -DMX_INSTALL_DIR="\"$(MX_INSTALL_DIR)\"" \ -o mx_config version/src/mx_config.c unix/src/editline/libedit.a: ( cd unix/src/editline ; $(EDITLINE_MAKECMD) ) cJSON.o: cJSON/cJSON.c cJSON/cJSON.h $(CC) -g -c $(OPTIMIZE) -fPIC cJSON/cJSON.c # # xdr_hyper.o will only be built on OpenBSD. # xdr_hyper.o: xdr/src/xdr_hyper.c xdr/src/xdr.h xdr/src/xdr_hyper.h clang -c $(CFLAGS) -I../libMx -DOS_BSD \ -D__MX_LIBRARY__ xdr/src/xdr_hyper.c