# HG changeset patch # User Edouard Tisserant # Date 1542356892 -3600 # Node ID 19bf8e678c42f18578b2006fa200e4d141ac9c36 # Parent 59783e8ee3d2983d76466b420624e4b87d166f47 Let Makefile use default CFLAGS and CC instead of overriding them diff -r 59783e8ee3d2 -r 19bf8e678c42 Makefile --- a/Makefile Sat Mar 18 15:46:04 2017 +0000 +++ b/Makefile Fri Nov 16 09:28:12 2018 +0100 @@ -6,10 +6,10 @@ OBJ_FILES = mb_ascii.o mb_rtu.o mb_tcp.o mb_master.o mb_slave.o mb_slave_and_master.o sin_util.o libmb.a: $(OBJ_FILES) - ar cr libmb.a $(OBJ_FILES) + $(AR) cr libmb.a $(OBJ_FILES) libmb.so: $(OBJ_FILES) - gcc -shared -fPIC -o libmb.so $(OBJ_FILES) + $(CC) -shared -fPIC -o libmb.so $(OBJ_FILES) clean: -rm -rf *.o libmb.a libmb.so @@ -17,12 +17,12 @@ # use gcc -CC = gcc +# CC = gcc #get warnings, debugging information and optimization -CFLAGS = -Wall -Wpointer-arith -Wstrict-prototypes -Wwrite-strings +# CFLAGS = -Wall -Wpointer-arith -Wstrict-prototypes -Wwrite-strings # CFLAGS += -Werror -CFLAGS += -ggdb -O3 -funroll-loops +# CFLAGS += -ggdb -O3 -funroll-loops # Note: if the optimizer crashes, we'll leave out the -O3 for those files # Required for compilation with beremiz, and to create shared object library