Forráskód Böngészése

all: several makefile corrections and organization steps

Douglas Andreani 5 éve
szülő
commit
78289ebd22
5 módosított fájl, 22 hozzáadás és 2 törlés
  1. 5 0
      .gitignore
  2. 10 0
      pthread/Makefile
  3. 0 0
      pthread/example.c
  4. 7 2
      x11-random/Makefile
  5. 0 0
      x11-random/worley_noise.c

+ 5 - 0
.gitignore

@@ -27,4 +27,9 @@ _testmain.go
 
 .vscode/
 *.exe
+<<<<<<< HEAD
 >>>>>>> 1cc34e1... global gitignore
+=======
+*.o
+*/bin/*
+>>>>>>> aacc961... all: several makefile corrections and organization steps

+ 10 - 0
pthread/Makefile

@@ -0,0 +1,10 @@
+CC=/usr/bin/gcc
+CFLAGS=-Wall -Werror -fno-builtin -O0 -g -pthread -m64 -std=iso9899:1990
+OBJ=bin/obj
+OBJS=$(OBJ)/example.o
+
+all: $(OBJS)
+	$(CC) $(CFLAGS) -o bin/example $(OBJS)
+
+bin/obj/example.o:
+	$(CC) $(CFLAGS) -c -o bin/obj/example.o example.c

+ 0 - 0
pthread/example1.c → pthread/example.c


+ 7 - 2
x11-random/Makefile

@@ -2,10 +2,15 @@ CC=/usr/bin/gcc
 CFLAGS=-g -Werror -pthread -pedantic -pedantic-errors -fno-fast-math -fno-builtin -m64 -std=iso9899:1999 -I${PWD} -lX11 -lm
 OUT=bin
 OBJ=$(OUT)/obj
+OBJS=$(OBJ)/worley_noise.o
 
 
-all:
-	$(CC) $(CFLAGS) worley-noise.c -o $(OUT)/worley-noise
+all: $(OBJS)
+	$(CC) $(CFLAGS) $(OBJS) -o $(OUT)/worley_noise
+
+bin/obj/worley_noise.o:
+	$(CC) $(CFLAGS) -c worley_noise.c -o $(OBJ)/worley_noise.o
+
 clean:
 	rm bin/* bin/obj/*
 

+ 0 - 0
x11-random/worley-noise.c → x11-random/worley_noise.c