-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'enhancement-install-uninstall' into unstable
- Loading branch information
Showing
9 changed files
with
197 additions
and
35 deletions.
There are no files selected for viewing
File renamed without changes.
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,31 @@ | ||
# | ||
# MIT License | ||
# | ||
# Copyright(c) 2018 Pedro Henrique Penna <pedrohenriquepenna@gmail.com> | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
# | ||
|
||
# Builds contrib. | ||
contrib: make-dirs | ||
$(MAKE) -C $(CONTRIBDIR)/hal install PREFIX=$(ROOTDIR) | ||
|
||
# Cleans the HAL. | ||
contrib-uninstall: | ||
$(MAKE) -C $(CONTRIBDIR)/hal uninstall PREFIX=$(ROOTDIR) |
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,84 @@ | ||
# | ||
# MIT License | ||
# | ||
# Copyright(c) 2018 Pedro Henrique Penna <pedrohenriquepenna@gmail.com> | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
# | ||
|
||
#=============================================================================== | ||
# Build Options | ||
#=============================================================================== | ||
|
||
# Installation Prefix | ||
export PREFIX ?= $(HOME) | ||
|
||
#=============================================================================== | ||
# Artifacts | ||
#=============================================================================== | ||
|
||
export ARTIFACTS := $(shell find $(INCDIR) -name *.h -type f) | ||
|
||
#=============================================================================== | ||
|
||
# Install | ||
install: | all-target copy-artifacts | ||
@mkdir -p $(PREFIX)/lib | ||
@cp -f $(LIBDIR)/libhal*.a $(PREFIX)/lib | ||
@echo [CP] $(LIBDIR)/libhal*.a | ||
@cp -f $(LIBDIR)/libkernel*.a $(PREFIX)/lib | ||
@echo [CP] $(LIBDIR)/libkernel*.a | ||
@cp -f $(LIBDIR)/libnanvix*.a $(PREFIX)/lib | ||
@echo [CP] $(LIBDIR)/libnanvix*.a | ||
@echo "===============================================================================" | ||
@echo "Nanvix Microkernel Successfully Installed into $(PREFIX)" | ||
@echo "===============================================================================" | ||
|
||
# Uninstall | ||
uninstall: | distclean delete-artifacts | ||
@rm -f $(PREFIX)/lib/libhal*.a | ||
@echo [RM] $(PREFIX)/lib/libhal*.a | ||
@rm -f $(PREFIX)/lib/libkernel*.a | ||
@echo [RM] $(PREFIX)/lib/libkernel*.a | ||
@rm -f $(PREFIX)/lib/libnanvix*.a | ||
@echo [RM] $(PREFIX)/lib/libnanvix*.a | ||
@echo "===============================================================================" | ||
@echo "Nanvix Microkernel Successfully Uninstalled from $(PREFIX)" | ||
@echo "===============================================================================" | ||
|
||
# Copies All Artifacts | ||
copy-artifacts: $(patsubst $(CURDIR)/%, copy/%, $(ARTIFACTS)) | ||
|
||
# Copy a Single Artifact | ||
copy/%: % | ||
$(eval file := $(<F)) | ||
$(eval dir := $(<D)) | ||
@echo [CP] $(dir)/$(file) | ||
@mkdir -p $(PREFIX)/$(dir) | ||
@cp -f $< $(PREFIX)/$(dir)/$(file) | ||
@chmod 444 $(PREFIX)/$(dir)/$(file) | ||
|
||
# Deletes All Artifacts | ||
delete-artifacts: $(patsubst $(CURDIR)/%, delete/%, $(ARTIFACTS)) | ||
|
||
# Deletes a Single Artifact | ||
delete/%: | ||
$(eval file := $(patsubst delete/%, %, $@)) | ||
@echo [RM] $(file) | ||
@rm -f $(PREFIX)/$(file) |
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,47 @@ | ||
# | ||
# MIT License | ||
# | ||
# Copyright(c) 2018 Pedro Henrique Penna <pedrohenriquepenna@gmail.com> | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
# | ||
|
||
# Runs Unit Tests in all clusters | ||
run: | ||
bash $(TOOLSDIR)/utils/nanvix-run.sh $(IMAGE) $(EXEC) $(TARGET) all --no-debug | ||
|
||
# Runs Unit Tests in IO Cluster. | ||
run-iocluster: | ||
bash $(TOOLSDIR)/utils/nanvix-run.sh $(IMAGE) $(EXEC) $(TARGET) iocluster --no-debug | ||
|
||
# Runs Unit Tests in Compute Cluster. | ||
run-ccluster: | ||
bash $(TOOLSDIR)/utils/nanvix-run.sh $(IMAGE) $(EXEC) $(TARGET) ccluster --no-debug | ||
|
||
# Runs Unit Tests in all clusters in debug mode. | ||
debug: | ||
bash $(TOOLSDIR)/utils/nanvix-run.sh $(IMAGE) $(EXEC) $(TARGET) all --debug | ||
|
||
# Runs Unit Tests in IO Cluster in debug mode. | ||
debug-iocluster: | ||
bash $(TOOLSDIR)/utils/nanvix-run.sh $(IMAGE) $(EXEC) $(TARGET) iocluster --debug | ||
|
||
# Runs Unit Tests in Compute Cluster in debug mode. | ||
debug-ccluster: | ||
bash $(TOOLSDIR)/utils/nanvix-run.sh $(IMAGE) $(EXEC) $(TARGET) ccluster --debug |
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
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
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
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
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