diff --git a/Makefile b/Makefile index 6444ed2..a212e69 100644 --- a/Makefile +++ b/Makefile @@ -8,11 +8,14 @@ PREFIX = /usr/local INSTALL = install LN = ln -# ATTENTION: You may need to enable the following lines to compile F3 -# on your platform. -#ARGP = /usr/local -#CFLAGS += -I$(ARGP)/include -#LDFLAGS += -L$(ARGP)/lib -largp +ifndef OS + OS = $(shell uname -s) +endif +ifneq ($(OS), Linux) + ARGP = /usr/local + CFLAGS += -I$(ARGP)/include + LDFLAGS += -L$(ARGP)/lib -largp +endif all: $(TARGETS) extra: $(EXTRA_TARGETS) diff --git a/README.rst b/README.rst index 507a42a..a07a2ed 100644 --- a/README.rst +++ b/README.rst @@ -154,23 +154,17 @@ for details. See https://trac.macports.org/browser/trunk/dports/sysutils/f3/Portfile for more information. -4) Set compilation flags. These following environment variables are used - in the Makefile to locate the argp library: +4) Build F3:: - HomeBrew:: - - export CFLAGS="$CFLAGS -I/usr/local/include/" - export LDFLAGS="$LDFLAGS -L/usr/local/lib/ -largp" - - MacPorts:: - - export CFLAGS="$CFLAGS -I/opt/local/include/" - export LDFLAGS="$LDFLAGS -L/opt/local/lib/ -largp" - -5) Build F3:: + When using Homebrew, you can just run:: make + When using MacPorts, you will need to pass the location where MacPorts + installed argp-standalone:: + + make ARGP=/opt/local + The extra applications for Linux --------------------------------