File tree Expand file tree Collapse file tree 2 files changed +25
-5
lines changed Expand file tree Collapse file tree 2 files changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,16 @@ TOURNAMENT_OBJECTS := $(TOURNAMENT_SOURCES:$(TOURNAMENT_SRC_DIR)/%.f=$(TOURNAMEN
2525
2626rm = rm -rf
2727
28- .PHONY : all clean remove
29- all : $(BIN_DIR ) /$(EXECUTABLE )
28+ .PHONY : all install uninstall clean remove
29+ all : $(BIN_DIR ) /$(EXECUTABLE )
30+
31+ install : $(BIN_DIR ) /$(EXECUTABLE )
32+ install -m 0755 $(BIN_DIR ) /$(LIBRARY ) /usr/local/lib
33+ install -m 0755 $(BIN_DIR ) /$(EXECUTABLE ) /usr/local/bin
34+
35+ uninstall :
36+ rm /usr/local/lib/$(LIBRARY )
37+ rm /usr/local/bin/$(EXECUTABLE )
3038
3139# Link the tournament object files and the strategies shared object file to create the executable
3240$(BIN_DIR ) /$(EXECUTABLE ) : $(TOURNAMENT_OBJECTS ) $(BIN_DIR ) /$(LIBRARY )
Original file line number Diff line number Diff line change @@ -61,8 +61,20 @@ Clone the repository and compile the Fortran code::
6161You should now have a `bin ` directory containing the the executable file,
6262`tourexec `, which you can run::
6363
64- $ cd bin
65- $ ./tourexec
64+ $ bin/tourexec
65+
66+ You can also chose to install the executable (and the associated library file)
67+ to standard locations on your local machine::
68+
69+ $ make install
70+
71+ The executable can now be run without having to specify its location::
72+
73+ $ tourexec
74+
75+ To remove both the executable and the libary from your machine, use::
76+
77+ $ make uninstall
6678
6779Cleanup
6880-------
@@ -72,7 +84,7 @@ Compiling the executable file will create some intermediary object files in an
7284
7385 $ make clean
7486
75- There is also a command to remove the executable itself as well as the object
87+ There is also a command to remove the ` bin ` directory as well as the object
7688files::
7789
7890 $ make remove
You can’t perform that action at this time.
0 commit comments