aboutsummaryrefslogtreecommitdiff
path: root/makefile.gnu
blob: d3f096045f5d01b54966d2cab1d88ab7c075e367 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#
# Automagically generated by Approximatrix Simply Fortran 3.12
#
FC?="gfortran"
CC?="gcc"
AR?="ar"
WRC?="windres"
RM=rm -f


OPTFLAGS= -g

SPECIALFLAGS=

RCFLAGS=-O coff

PRJ_FFLAGS=

PRJ_CFLAGS=

PRJ_LFLAGS=-lssl -lcrypto

FFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_FFLAGS) -Jmodules 

CFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_CFLAGS)

build:
	mkdir -p $@

modules:
	mkdir -p $@

.PHONY: all clean


build/errors.o: errors.c | build
	@echo Compiling errors.c
	@$(CC) -c -o "build/errors.o" $(CFLAGS) "errors.c"

build/jessl.o: jessl.f90 | modules build
	@echo Compiling jessl.f90
	@$(FC) -c -o "build/jessl.o" $(FFLAGS) "jessl.f90"
modules/jessl.mod : | modules build/jessl.o

build/main.o: main.f90 modules/jessl.mod | modules build
	@echo Compiling main.f90
	@$(FC) -c -o "build/main.o" $(FFLAGS) "main.f90"

clean:
	@echo Deleting build/errors.o and related files
	@$(RM) "build/errors.o"
	@echo Deleting build/jessl.o and related files
	@$(RM) "build/jessl.o" "modules/jessl.mod" "modules/jessl.smod"
	@echo Deleting build/main.o and related files
	@$(RM) "build/main.o"
	@echo Deleting directory modules
	@rmdir modules
	@echo Deleting directory build
	@rmdir build
	@echo Deleting gnc
	@$(RM) "gnc"

gnc: build/jessl.o build/main.o
	@echo Generating gnc
	@$(FC) -o "gnc" build/jessl.o build/main.o $(LDIR) $(PRJ_LFLAGS)

all: gnc