Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Elsa Gonsiorowski
codes
Commits
6a6765c0
Commit
6a6765c0
authored
Jul 16, 2015
by
Jonathan Jenkins
Browse files
update example makefiles to use pkg-config
parent
6655b928
Changes
2
Hide whitespace changes
Inline
Side-by-side
doc/example/Makefile
View file @
6a6765c0
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
doc/example_heterogeneous/Makefile
View file @
6a6765c0
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment