Skip to content

Commit

Permalink
Merge pull request #74 from mistydemeo/set_argp_per_os
Browse files Browse the repository at this point in the history
Set argp-standalone flags per-OS
  • Loading branch information
AltraMayor committed Jan 31, 2018
2 parents ed8c937 + 572af38 commit e9495c1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 6 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,22 +154,16 @@ 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::
When using Homebrew, you can just run::

export CFLAGS="$CFLAGS -I/opt/local/include/"
export LDFLAGS="$LDFLAGS -L/opt/local/lib/ -largp"
make

5) Build F3::
When using MacPorts, you will need to pass the location where MacPorts
installed argp-standalone::

make
make ARGP=/opt/local

The extra applications for Linux
--------------------------------
Expand Down

0 comments on commit e9495c1

Please sign in to comment.