Commit 7b22be99 authored by Jonathan Jenkins's avatar Jonathan Jenkins

example program make now uses ross-config

parent bfb283bf
all: check example.o 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
CFLAGS= -Wall
CC=mpicc
# ross conflates CFLAGS with CPPFLAGS, so use just this one
override CPPFLAGS += $(shell $(ROSS)/bin/ross-config --cflags) -I$(CODESBASE)/include -I$(CODESNET)/include/codes
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
check: check-env
@echo CODESBASE: $(CODESBASE)
@echo CODESNET: $(CODESNET)
@echo ROSS: $(ROSS)
example.o: example.c
$(CC) -c $(CFLAGS) -I$(ROSS)/include -I$(CODESBASE)/include -I$(CODESNET)/include example.c
example: example.c
example: example.o
$(CC) $(CFLAGS) example.o -o example -L$(ROSS)/lib -lROSS -lm -L$(CODESBASE)/lib -lcodes-base -L$(CODESNET)/lib -lcodes-net
#$(CC) $(ROSS_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $(ROSS_LDFLAGS) $^ -o $@ -L$(ROSS)/lib -lROSS -lm -L$(CODESBASE)/lib -lcodes-base -L$(CODESNET)/lib -lcodes-net
check-env:
ifndef CODESBASE
......
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