Working makefile
This commit is contained in:
		
							parent
							
								
									a5fb9b64bc
								
							
						
					
					
						commit
						a22c78c7cb
					
				
							
								
								
									
										19
									
								
								2019/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								2019/Makefile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,19 @@
 | 
			
		||||
FC:=gfortran
 | 
			
		||||
FFLAGS:=-Wall
 | 
			
		||||
BIN:=./bin
 | 
			
		||||
SRC:=./src
 | 
			
		||||
BINS:=./bin/test.bin
 | 
			
		||||
 | 
			
		||||
all: aoc19
 | 
			
		||||
 | 
			
		||||
$(SRC)/%.o: $(SRC)/%.f90
 | 
			
		||||
	$(FC) $(FFLAGS) -c -o $@ $<
 | 
			
		||||
 | 
			
		||||
$(BIN)/%.bin: $(SRC)/%.o
 | 
			
		||||
	$(FC) $(FFLAGS) -o $@ $<
 | 
			
		||||
 | 
			
		||||
aoc19: $(BINS)
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	rm -f $(BINS)
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										3
									
								
								2019/src/test.f90
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								2019/src/test.f90
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,3 @@
 | 
			
		||||
program test
 | 
			
		||||
    print *, 'Hellord!'
 | 
			
		||||
end program test
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user