From 7f60eebbe0341025cb62b562a2b0579827575d4f Mon Sep 17 00:00:00 2001 From: rensichao Date: Wed, 20 Mar 2024 14:31:31 +0800 Subject: [PATCH] revise Makefile to adapt the Shixy environment on Ubuntu 14 --- src/Makefile | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Makefile b/src/Makefile index 77d1756..00ff494 100644 --- a/src/Makefile +++ b/src/Makefile @@ -19,9 +19,9 @@ VER := $(strip $(VER)) MY_CFLAGS = -fmessage-length=0 ifeq ($(PLAT),x86) -MY_LIBS = -lpthread -L../lib -lrt -ldl -lscl_shm -lm -lgo +MY_LIBS = -lpthread -L../lib -lrt -ldl -lscl_shm -lm -lgo -lmodbus else -MY_LIBS = -L../lib -lpthread -lrt -ldl -lscl_shm -lm -lgo +MY_LIBS = -L../lib -lpthread -lrt -ldl -lscl_shm -lm -lgo -lmodbus endif # The pre-processor options used by the cpp (man cpp for more). @@ -53,19 +53,19 @@ HDREXTS = .h .H .hh .hpp .HPP .h++ .hxx .hp # Users can override those variables from the command line. ifeq ($(VER),debug) ifeq ($(TYPE),so) -CFLAGS = -ggdb -pipe -O0 -fPIC -I. -I../inc -CXXFLAGS= -ggdb -pipe -O0 -fPIC -I. -I../inc +CFLAGS = -ggdb -pipe -O0 -fPIC -I./EasyLogger/inc -I../inc +CXXFLAGS= -ggdb -pipe -O0 -fPIC -I./EasyLogger/inc -I../inc else -CFLAGS = -ggdb -pipe -O0 -I. -I../inc -CXXFLAGS= -ggdb -pipe -O0 -I. -I../inc +CFLAGS = -ggdb -pipe -O0 -I./EasyLogger/inc -I../inc +CXXFLAGS= -ggdb -pipe -O0 -I./EasyLogger/inc -I../inc endif else ifeq ($(TYPE),so) -CFLAGS = -O2 -pipe -fPIC -I. -I../inc -CXXFLAGS= -O2 -pipe -fPIC -I. -I../inc +CFLAGS = -O2 -pipe -fPIC -I./EasyLogger/inc -I../inc +CXXFLAGS= -O2 -pipe -fPIC -I./EasyLogger/inc -I../inc else -CFLAGS = -O2 -pipe -I. -I../inc -CXXFLAGS= -O2 -pipe -I. -I../inc +CFLAGS = -O2 -pipe -I./EasyLogger/inc -I../inc +CXXFLAGS= -O2 -pipe -I./EasyLogger/inc -I../inc endif endif @@ -73,14 +73,14 @@ endif ifeq ($(PLAT),x86) CC = gcc else -CC = arm-linux-gnueabihf-gcc +CC = /root/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc endif # The C++ program compiler. ifeq ($(PLAT),x86) CXX = g++ else -CXX = arm-linux-gnueabihf-g++ +CXX = /root/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ endif # Un-comment the following line to compile C programs as C++ ones. @@ -89,7 +89,7 @@ endif ifeq ($(PLAT),x86) STRIP = strip else -STRIP = arm-none-linux-gnueabi-strip +STRIP = /root/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-strip endif # The command used to delete file. @@ -114,7 +114,7 @@ ifeq ($(PROGRAM),) endif endif ifeq ($(SRCDIRS),) - SRCDIRS = . + SRCDIRS = . ./EasyLogger/src endif SOURCES = $(foreach d,$(SRCDIRS),$(wildcard $(addprefix $(d)/*,$(SRCEXTS)))) HEADERS = $(foreach d,$(SRCDIRS),$(wildcard $(addprefix $(d)/*,$(HDREXTS))))