diff --git a/src/components/C/C_Set_Up.vue b/src/components/C/C_Set_Up.vue index 56d4593..8943155 100644 --- a/src/components/C/C_Set_Up.vue +++ b/src/components/C/C_Set_Up.vue @@ -29,7 +29,7 @@ import CodeTag from "../tags/CodeTag.vue";
For any big C projects, a project structure is very important. It helps to organize and keep track of our - classes and libraries. But for smaller projects, or just for testing purposes, a project structure could be too + code. But for smaller projects, or just for testing purposes, a project structure could be too redundant. @@ -79,23 +79,25 @@ project/ - makefile + Makefile

-FC = gfortran  # Fortran compiler
-FFLAGS = -O2   # Compiler flags (optimization level)
+# Makefile for hello.c
+
+CC = gcc  # C compiler
+CFLAGS = -O2   # Compiler flags (optimization level)
 
 hello: hello.o
-    $(FC) $(FFLAGS) -o $@ $^
+	$(CC) $(CFLAGS) -o $@ $^
 
-hello.o: hello.f90
-    $(FC) $(FFLAGS) -c $<
+hello.o: hello.c
+	$(CC) $(CFLAGS) -c $<
 
 run:
-    ./hello
+	./hello
 
 clean:
-    rm -f *.o hello
+	rm -f *.o hello
 
diff --git a/src/components/Fortran/Fortran_Set_Up.vue b/src/components/Fortran/Fortran_Set_Up.vue index f811d79..661d809 100644 --- a/src/components/Fortran/Fortran_Set_Up.vue +++ b/src/components/Fortran/Fortran_Set_Up.vue @@ -103,7 +103,7 @@ end program hello - makefile + Makefile

 FC = gfortran  # Fortran compiler