Commit 6a6765c0 authored by Jonathan Jenkins's avatar Jonathan Jenkins

update example makefiles to use pkg-config

parent 6655b928
ifndef CODESBASE
$(error CODESBASE is undefined, see README.txt)
endif
ifndef CODESNET
$(error CODESNET is undefined, see README.txt)
endif
ifndef ROSS
$(error ROSS is undefined, see README.txt)
endif
# ross conflates CFLAGS with CPPFLAGS, so use just this one
override CPPFLAGS += $(shell $(ROSS)/bin/ross-config --cflags) -I$(CODESBASE)/include -I$(CODESNET)/include
CC = $(shell $(ROSS)/bin/ross-config --cc)
LDFLAGS = $(shell $(ROSS)/bin/ross-config --ldflags) -L$(CODESBASE)/lib -L$(CODESNET)/lib
LDLIBS = $(shell $(ROSS)/bin/ross-config --libs) -lcodes-net -lcodes-base
example: example.c
clean:
rm -f example
ifndef CODESBASE
$(error CODESBASE is undefined, see README.txt)
endif
ifndef CODESNET
$(error CODESNET is undefined, see README.txt)
endif
ifndef ROSS
$(error ROSS is undefined, see README.txt)
endif
PKG_PATH = $(ROSS)/lib/pkgconfig:$(CODESBASE)/lib/pkgconfig:$(CODESNET)/lib/pkgconfig
override CPPFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_PATH) pkg-config --cflags codes-net codes-base ross)
LDFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_PATH) pkg-config --libs-only-L ross codes-net codes-base ross)
LDLIBS = $(shell PKG_CONFIG_PATH=$(PKG_PATH) pkg-config --libs-only-l ross codes-net codes-base ross)
CC = mpicc
example: example.c
clean:
rm -f example
ifndef CODESBASE
$(error CODESBASE is undefined, see README.txt)
endif
ifndef CODESNET
$(error CODESNET is undefined, see README.txt)
endif
ifndef ROSS
$(error ROSS is undefined, see README.txt)
endif
# ross conflates CFLAGS with CPPFLAGS, so use just this one
override CPPFLAGS += $(shell $(ROSS)/bin/ross-config --cflags) -I$(CODESBASE)/include -I$(CODESNET)/include
CC = $(shell $(ROSS)/bin/ross-config --cc)
LDFLAGS = $(shell $(ROSS)/bin/ross-config --ldflags) -L$(CODESBASE)/lib -L$(CODESNET)/lib
LDLIBS = $(shell $(ROSS)/bin/ross-config --libs) -lcodes-net -lcodes-base
example: example.c
clean:
rm -f example
ifndef CODESBASE
$(error CODESBASE is undefined, see README.txt)
endif
ifndef CODESNET
$(error CODESNET is undefined, see README.txt)
endif
ifndef ROSS
$(error ROSS is undefined, see README.txt)
endif
PKG_PATH = $(ROSS)/lib/pkgconfig:$(CODESBASE)/lib/pkgconfig:$(CODESNET)/lib/pkgconfig
override CPPFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_PATH) pkg-config --cflags codes-net codes-base ross)
LDFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_PATH) pkg-config --libs-only-L ross codes-net codes-base ross)
LDLIBS = $(shell PKG_CONFIG_PATH=$(PKG_PATH) pkg-config --libs-only-l ross codes-net codes-base ross)
CC = mpicc
example: example.c
clean:
rm -f example
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment