Commits

Anonymous committed 5f5d631

added "-fPIC" to samples/*/Makefile

Comments (0)

Files changed (4)

samples/kaplan_yorke_map/Makefile

 all: $(slib)
 
 libkaplan_yorke_map.so: kaplan_yorke_map.o
-	gcc -shared -o $@ $<
+	$(CC) -shared -o $@ $<
 
 kaplan_yorke_map.o: kaplan_yorke_map.c
-	gcc -c $< -fPIC -O3 -ftree-vectorizer-verbose=1
+	$(CC) -c $< -fPIC -O3 -ftree-vectorizer-verbose=1
 
 clean:
 	-rm $(objs) $(slib)

samples/lode/Makefile

 all: liblode.so liblode_cfuncprefix.so
 
 liblode.so: lode.c
-	$(CC) $(CFLAGS) $(CPPFLAGS) -Wall -shared $< -o $@
+	$(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -Wall -shared $< -o $@
 
 liblode_cfuncprefix.so: lode_cfuncprefix.c
-	$(CC) $(CFLAGS) $(CPPFLAGS) -Wall -shared $< -o $@
+	$(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -Wall -shared $< -o $@
 
 clean:
 	-rm *.so

samples/lode_rk4/Makefile

 liblode_rk4.so: lode_rk4.c
-	$(CC) $(CFLAGS) $(CPPFLAGS) -Wall -shared $< -o $@
+	$(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -Wall -shared $< -o $@
 
 clean:
 	-rm *.so

samples/logistic_map/Makefile

 liblogistic_map.so: logistic_map.c
-	$(CC) $(CFLAGS) $(CPPFLAGS) -Wall -shared $< -o $@ -lgsl -lgslcblas
+	$(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -Wall -shared $< -o $@ -lgsl -lgslcblas
 
 clean:
 	-rm *.so