-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes to some Makefiles so that the code can be built from the root…
… of the dir tree
- Loading branch information
1 parent
d745a34
commit 0e43c6a
Showing
3 changed files
with
90 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This file is part of the methpipe system | ||
# | ||
# Copyright (C) 2014 University of Southern California, | ||
# Andrew D. Smith | ||
# | ||
# Authors: Andrew D. Smith | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
|
||
AMORDAD_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) | ||
|
||
all: | ||
@make -C src AMORDAD_ROOT=$(AMORDAD_ROOT) OPT=1 | ||
|
||
install: | ||
@make -C src AMORDAD_ROOT=$(AMORDAD_ROOT) OPT=1 install | ||
|
||
clean: | ||
@make -C src AMORDAD_ROOT=$(AMORDAD_ROOT) clean | ||
.PHONY: clean | ||
|
||
distclean: clean | ||
@rm -rf $(AMORDAD_ROOT)/bin | ||
.PHONY: distclean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# This file is part of the methpipe system | ||
# | ||
# Copyright (C) 2014 University of Southern California, | ||
# Andrew D. Smith | ||
# | ||
# Authors: Andrew D. Smith | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
|
||
all_subdirs=common progs | ||
lib_subdirs=common | ||
app_subdirs=progs | ||
|
||
# check if a global copy of smithlab_cpp cannot be found and try to | ||
# use a copy that is in the current directory | ||
ifndef SMITHLAB_CPP | ||
SMITHLAB_CPP=$(abspath $(dir $(MAKEFILE_LIST)))/smithlab_cpp | ||
ifeq ("$(wildcard $(SMITHLAB_CPP))","") | ||
$(error SMITHLAB_CPP not set and smithlab_cpp not found) | ||
endif | ||
all_subdirs += $(SMITHLAB_CPP) | ||
lib_subdirs += $(SMITHLAB_CPP) | ||
endif | ||
|
||
all: | ||
@for i in $(app_subdirs); do \ | ||
make -C $${i} SMITHLAB_CPP=$(SMITHLAB_CPP) OPT=1; \ | ||
done; | ||
|
||
install: | ||
@for i in $(app_subdirs); do \ | ||
make -C $${i} SMITHLAB_CPP=$(SMITHLAB_CPP) OPT=1 install; \ | ||
done; | ||
|
||
clean: | ||
@for i in $(all_subdirs); do \ | ||
make -C $${i} SMITHLAB_CPP=$(SMITHLAB_CPP) clean; \ | ||
done; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters