From 9fc8fe737ccacf4ee86efd1424fae3b0802331d3 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Tue, 1 Jun 2021 11:11:30 -0400 Subject: Added a GNU make makefile. --- player/levitating-player.prj | 107 +++++++++++++++++----------------- player/makefile.gnu | 133 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 188 insertions(+), 52 deletions(-) create mode 100644 player/makefile.gnu (limited to 'player') diff --git a/player/levitating-player.prj b/player/levitating-player.prj index 7e1cc28..b871c9a 100644 --- a/player/levitating-player.prj +++ b/player/levitating-player.prj @@ -1,26 +1,8 @@ { "Root":{ - "Files":[{ - "filename":"config.f90", - "enabled":"1" - },{ - "filename":"endpoints.f90", - "enabled":"1" - },{ - "filename":"instructions.f90", - "enabled":"1" - },{ - "filename":"player.F90", - "enabled":"1" - },{ - "filename":"talking.f90", - "enabled":"1" - },{ - "filename":"tasks.f90", - "enabled":"1" - }], - "Name":"+levitating-player (levitating-player)", "Folders":[{ + "Folders":[], + "Name":"+common", "Files":[{ "filename":"../common/jessl.f90", "enabled":"1" @@ -42,64 +24,85 @@ },{ "filename":"../common/wsa.f90", "enabled":"0" - }], - "Name":"+common", - "Folders":[] + }] + }], + "Name":"+levitating-player (levitating-player)", + "Files":[{ + "filename":"config.f90", + "enabled":"1" + },{ + "filename":"endpoints.f90", + "enabled":"1" + },{ + "filename":"instructions.f90", + "enabled":"1" + },{ + "filename":"makefile.gnu", + "enabled":"1" + },{ + "filename":"player.F90", + "enabled":"1" + },{ + "filename":"talking.f90", + "enabled":"1" + },{ + "filename":"tasks.f90", + "enabled":"1" }] }, "Name":"levitating-player (levitating-player)", "Options":{ "Compiler Options":{ + "Fortran Flags":"-DGNU", "Link Flags":"-ljsonfortran -lssl -lcrypto", - "C Flags":"", - "Fortran Flags":"-DGNU" + "C Flags":"" }, + "Architecture":1, + "Type":0, "Revision":2, + "Windows GUI":0, + "File Options":{ + "Library Directories":["Default Add-On Directory","../support/lib","/opt/homebrew/opt/openssl@1.1/lib"], + "Build Directory":"build", + "Module Directory":"modules", + "Include Directories":["Default Add-On Include Directory","../support/include"] + }, + "Target":"levitating-player", "Fortran Options":{ - "Enable Coarrays":"false", - "Cray Pointers":"false", + "Use C Preprocessor":"false", "Runtime Diagnostics":"false", + "Floating Point Exception Trap":0, + "Cray Pointers":"false", + "Enable Coarrays":"false", "Enable OpenMP":"false", "Initialize Variables to Zero":"false", - "Floating Point Exception Trap":0, - "Default Double for Real":"false", - "Use C Preprocessor":"false" + "Default Double for Real":"false" }, "Code Generation Options":{ + "CPU Specific":"false", + "Processor":"generic", + "Aggressive Loops":"false", "Debugging":"true", - "Profiling":"false", "Optimization Mode":0, - "Aggressive Loops":"false", - "Processor":"generic", - "CPU Specific":"false" + "Profiling":"false" }, + "Build Dependencies":1, "Launch Options":{ - "Command Line Arguments":"-i windows-1 -l /tmp/player.log -w /tmp/example 127.0.0.1", - "External Console":"false", - "Keep Console":"true", + "Working Directory":"/tmp/example", "Launch Using MPI":"false", - "Build Before Launch":"true", - "Working Directory":"/tmp/example" + "Keep Console":"true", + "External Console":"false", + "Command Line Arguments":"-i windows-1 -l /tmp/player.log -w /tmp/example 127.0.0.1", + "Build Before Launch":"true" }, "Build Options":{ "Makefile":"Makefile", "Auto Makefile":"true" }, - "Type":0, - "Build Dependencies":1, "Linker Options":{ "Static Linking Mode":3, - "Link LAPACK":0, - "Link MPI Library":"false" - }, - "Target":"levitating-player", - "Architecture":1, - "Windows GUI":0, - "File Options":{ - "Module Directory":"modules", - "Library Directories":["Default Add-On Directory","../support/lib","/opt/homebrew/opt/openssl@1.1/lib"], - "Build Directory":"build", - "Include Directories":["Default Add-On Include Directory","../support/include"] + "Link MPI Library":"false", + "Link LAPACK":0 } } } \ No newline at end of file diff --git a/player/makefile.gnu b/player/makefile.gnu new file mode 100644 index 0000000..a70e69b --- /dev/null +++ b/player/makefile.gnu @@ -0,0 +1,133 @@ +# +# Automagically generated by Approximatrix Simply Fortran 3.18 +# +FC?="gfortran" +CC?="/usr/bin/gcc" +AR?="ar" +WRC?="windres" +RM=rm -f + +IDIR=-I../support/include + +LDIR=-L../support/lib +# warning - directory error: /opt/homebrew/opt/openssl@1.1/lib + + +OPTFLAGS= -g + +SPECIALFLAGS=$(IDIR) + +RCFLAGS=-O coff + +PRJ_FFLAGS=-DGNU + +PRJ_CFLAGS= + +PRJ_LFLAGS=-ljsonfortran -lssl -lcrypto + +FFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_FFLAGS) -Jmodules + +CFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_CFLAGS) + +build: + mkdir -p $@ + +modules: + mkdir -p $@ + +.PHONY: all clean + +build/config.o: config.f90 | modules build + @echo Compiling config.f90 + @$(FC) -c -o "build/config.o" $(FFLAGS) "config.f90" +modules/config.mod : | modules build/config.o + +build/endpoints.o: endpoints.f90 modules/config.mod modules/utilities.mod | modules build + @echo Compiling endpoints.f90 + @$(FC) -c -o "build/endpoints.o" $(FFLAGS) "endpoints.f90" +modules/player_endpoints.mod : | modules build/endpoints.o + +build/instructions.o: instructions.f90 modules/tasks.mod modules/utilities.mod modules/talking.mod modules/player_endpoints.mod | modules build + @echo Compiling instructions.f90 + @$(FC) -c -o "build/instructions.o" $(FFLAGS) "instructions.f90" +modules/instructions.mod : | modules build/instructions.o + +build/jessl.o: ../common/jessl.f90 | modules build + @echo Compiling ../common/jessl.f90 + @$(FC) -c -o "build/jessl.o" $(FFLAGS) "../common/jessl.f90" +modules/jessl.mod : | modules build/jessl.o + +build/network.o: ../common/network.F90 | modules build + @echo Compiling ../common/network.F90 + @$(FC) -c -o "build/network.o" $(FFLAGS) "../common/network.F90" +modules/network.mod : | modules build/network.o + +build/player.o: player.F90 modules/config.mod modules/instructions.mod modules/player_endpoints.mod modules/talking.mod modules/gemini_protocol.mod modules/utilities.mod | modules build + @echo Compiling player.F90 + @$(FC) -c -o "build/player.o" $(FFLAGS) "player.F90" + +build/protocol.o: ../common/protocol.f90 modules/request.mod modules/utilities.mod modules/jessl.mod | modules build + @echo Compiling ../common/protocol.f90 + @$(FC) -c -o "build/protocol.o" $(FFLAGS) "../common/protocol.f90" +modules/gemini_protocol.mod : | modules build/protocol.o + +build/request.o: ../common/request.f90 modules/network.mod modules/jessl.mod | modules build + @echo Compiling ../common/request.f90 + @$(FC) -c -o "build/request.o" $(FFLAGS) "../common/request.f90" +modules/request.mod : | modules build/request.o + +build/talking.o: talking.f90 modules/utilities.mod modules/gemini_protocol.mod modules/config.mod | modules build + @echo Compiling talking.f90 + @$(FC) -c -o "build/talking.o" $(FFLAGS) "talking.f90" +modules/talking.mod : | modules build/talking.o + +build/tasks.o: tasks.f90 modules/config.mod modules/utilities.mod modules/gemini_protocol.mod | modules build + @echo Compiling tasks.f90 + @$(FC) -c -o "build/tasks.o" $(FFLAGS) "tasks.f90" +modules/tasks.mod : | modules build/tasks.o + +build/utilities.o: ../common/utilities.F90 | modules build + @echo Compiling ../common/utilities.F90 + @$(FC) -c -o "build/utilities.o" $(FFLAGS) "../common/utilities.F90" +modules/utilities.mod : | modules build/utilities.o + +clean: + @echo Deleting build/config.o and related files + @$(RM) "build/config.o" "modules/config.mod" "modules/config.smod" + @echo Deleting build/endpoints.o and related files + @$(RM) "build/endpoints.o" "modules/player_endpoints.mod" "modules/player_endpoints.smod" + @echo Deleting build/instructions.o and related files + @$(RM) "build/instructions.o" "modules/instructions.mod" "modules/instructions.smod" + @echo Deleting build/jessl.o and related files + @$(RM) "build/jessl.o" "modules/jessl.mod" "modules/jessl.smod" + @echo Deleting build/network.o and related files + @$(RM) "build/network.o" "modules/network.mod" "modules/network.smod" + @echo Deleting build/player.o and related files + @$(RM) "build/player.o" + @echo Deleting build/protocol.o and related files + @$(RM) "build/protocol.o" "modules/gemini_protocol.mod" "modules/gemini_protocol.smod" + @echo Deleting build/request.o and related files + @$(RM) "build/request.o" "modules/request.mod" "modules/request.smod" + @echo Deleting build/talking.o and related files + @$(RM) "build/talking.o" "modules/talking.mod" "modules/talking.smod" + @echo Deleting build/tasks.o and related files + @$(RM) "build/tasks.o" "modules/tasks.mod" "modules/tasks.smod" + @echo Deleting build/testnum.o and related files + @$(RM) "build/testnum.o" + @echo Deleting build/utilities.o and related files + @$(RM) "build/utilities.o" "modules/utilities.mod" "modules/utilities.smod" + @echo Deleting build/wsa.o and related files + @$(RM) "build/wsa.o" + @echo Deleting directory modules + @rmdir modules + @echo Deleting directory build + @rmdir build + @echo Deleting levitating-player + @$(RM) "levitating-player" + +levitating-player: build/config.o build/endpoints.o build/instructions.o build/jessl.o build/network.o build/player.o build/protocol.o build/request.o build/talking.o build/tasks.o build/utilities.o + @echo Generating levitating-player + @$(FC) -o "levitating-player" -static-libgfortran -static-libgcc build/config.o build/endpoints.o build/instructions.o build/jessl.o build/network.o build/player.o build/protocol.o build/request.o build/talking.o build/tasks.o build/utilities.o $(LDIR) $(PRJ_LFLAGS) + +all: levitating-player + -- cgit v1.2.3