Prechádzať zdrojové kódy

new additions to support freebsd

Douglas Andreani 4 rokov pred
rodič
commit
cb1093aac1

+ 3 - 0
.gitignore

@@ -30,3 +30,6 @@ _testmain.go
 */bin/*
 *.c~
 *.h~
+
+# Freebsd core files
+*.core

+ 26 - 0
mandelbrot/Makefile-fbsd-amd64

@@ -0,0 +1,26 @@
+CC=/usr/bin/clang
+CFLAGS=-g -Werror -D _DEFAULT_SOURCE -O0 -D_XOPEN_SOURCE=600 -pthread -pedantic -pedantic-errors -fno-fast-math -fno-builtin -m64 -std=iso9899:1999 -I/usr/local/include/ -I${PWD} -I${PWD}/../libpng 
+OUT=bin
+OBJ=$(OUT)/obj
+OBJS=$(OBJ)/mandelbrot.o $(OBJ)/img.o  $(OBJ)/queue.o   
+
+
+all: pre bin/mandelbrot
+
+bin/mandelbrot: $(OBJS)
+	$(CC) $(CFLAGS) $(OBJS) -o $(OUT)/mandelbrot -pthread -L/usr/local/lib/ -lpng
+
+bin/obj/mandelbrot.o: mandelbrot.c config.h
+	$(CC) $(CFLAGS) -c mandelbrot.c -o $(OBJ)/mandelbrot.o -pthread
+
+bin/obj/img.o: ../libpng/img.c
+	$(CC) $(CFLAGS) -c ../libpng/img.c -o $(OBJ)/img.o
+
+bin/obj/queue.o: queue.c
+	$(CC) $(CFLAGS) -c queue.c -o $(OBJ)/queue.o -pthread
+
+pre:
+	mkdir -p bin/obj
+
+clean:
+	find ./bin -type f -exec rm {} \;

+ 17 - 0
x11-random/Makefile-fbsd-amd64

@@ -0,0 +1,17 @@
+CFLAGS=-g -Werror -pthread -pedantic -pedantic-errors -fno-fast-math -fno-builtin -m64 -std=iso9899:1999 -I${PWD} -I/usr/local/include -L/usr/local/lib
+OUT=bin
+OBJ=$(OUT)/obj
+OBJS=$(OBJ)/worley_noise.o
+
+
+all: bin/worley_noise
+
+bin/worley_noise: $(OBJS)
+	$(CC) $(CFLAGS) $(OBJS) -o $(OUT)/worley_noise -lX11 -lm
+
+bin/obj/worley_noise.o: worley_noise.c
+	$(CC) $(CFLAGS) -c worley_noise.c -o $(OBJ)/worley_noise.o 
+
+clean:
+	find ./bin -type f -exec rm {} \;
+