From e5bf842cdfd13327edf298ee201df4a1767d00cb Mon Sep 17 00:00:00 2001 From: xibowen Date: Wed, 23 Aug 2023 16:16:22 +0800 Subject: [PATCH] Fix make install without some head file Remove redundant makefile --- src/config/CMakeLists.txt | 4 ++-- src/config/Makefile | 20 -------------------- src/log/Makefile | 20 -------------------- src/timer/CMakeLists.txt | 4 ++-- src/timer/Makefile | 26 -------------------------- src/utils/CMakeLists.txt | 4 ++-- 6 files changed, 6 insertions(+), 72 deletions(-) delete mode 100644 src/config/Makefile delete mode 100644 src/log/Makefile delete mode 100644 src/timer/Makefile diff --git a/src/config/CMakeLists.txt b/src/config/CMakeLists.txt index d30cbd7..0974f42 100644 --- a/src/config/CMakeLists.txt +++ b/src/config/CMakeLists.txt @@ -7,5 +7,5 @@ target_link_libraries(kyconf-test-struct kyconf kylog pthread) install(TARGETS kyconf DESTINATION ${CMAKE_INSTALL_RPATH}) -# install(FILES libkyconf.h -# DESTINATION include/kysdk/kysdk-base) +install(FILES libkyconf.h + DESTINATION include/kysdk/kysdk-base) diff --git a/src/config/Makefile b/src/config/Makefile deleted file mode 100644 index fea3701..0000000 --- a/src/config/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -OBJ=gsettingsparse.o jsonparse.o structparse.o xmlparse.o - -CFLAGS=-g -O0 -Wall -fPIC -I../ -I../utils/ -I../config/ -CLIBS=-lpthread -CC:=$(shell bash -c 'type $(CC) &> /dev/null && echo $(CC) || echo gcc') -TARGET=libkyconf.so -LIBINST=libkyconf.so.1.0.0 -LIBHEAD=kyconf.h -LIBINSTHEADER=/usr/include/kysdk/base/ - -all:$(OBJ) - $(CC) -o $(LIBINST) configure.c $(OBJ) $(CFLAGS) $(CLIBS) -shared - mkdir -p lib/ - mv -f $(LIBINST) lib/ - cd lib/ && ln -sf $(LIBINST) $(TARGET) && cd .. - -rm *.o &> /dev/null - -clean: - -rm *.o &> /dev/null - -rm ../lib/$(TARGET) &> /dev/null \ No newline at end of file diff --git a/src/log/Makefile b/src/log/Makefile deleted file mode 100644 index 7a664a7..0000000 --- a/src/log/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -OBJ=core.o format.o klog_mqueue.o kylog.o write.o writeFile.o - -CFLAGS=-g -O0 -Wall -fPIC -I../ -I../utils/ -I../config/ -# CLIBS=-lpthread -lsystemd -CC:=$(shell bash -c 'type $(CC) &> /dev/null && echo $(CC) || echo gcc') -TARGET=libkylog.so -LIBINST=libkylog.so.1.0.0 -LIBHEAD=kylog.h -LIBINSTHEADER=/usr/include/kylog/ - -all:$(OBJ) - $(CC) -o $(LIBINST) $(OBJ) $(CFLAGS) $(CLIBS) -shared - mkdir -p lib/ - mv -f $(LIBINST) lib/ - cd lib/ && ln -sf $(LIBINST) $(TARGET) && cd .. - -rm *.o &> /dev/null - -clean: - -rm *.o &> /dev/null - -rm ../lib/$(TARGET) &> /dev/null \ No newline at end of file diff --git a/src/timer/CMakeLists.txt b/src/timer/CMakeLists.txt index 137b87e..1b22425 100644 --- a/src/timer/CMakeLists.txt +++ b/src/timer/CMakeLists.txt @@ -8,5 +8,5 @@ target_link_libraries(test-kytimer kytimer) install(TARGETS kytimer DESTINATION ${CMAKE_INSTALL_RPATH}) -# install(FILES libkytimer.h -# DESTINATION include/kysdk/kysdk-base) +install(FILES libkytimer.h + DESTINATION include/kysdk/kysdk-base) diff --git a/src/timer/Makefile b/src/timer/Makefile deleted file mode 100644 index feb4fc1..0000000 --- a/src/timer/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -CLIBS=-lpthread -lrt -CFLAGS=-g -O0 -Wall -fPIC -shared - -CC=cc -TARGET=libkytimer.so -LIBINSTALLNAME=libkytimer.so.1.0.0 -LIBINSTALLDIR=/usr/lib/ -HEADERINSTALLDIR=/usr/include/ -HEADERS=kytimer.h - -.PHONY:all -.PHONY:clean -.PHONY:lib - -all:lib - -lib: - $(CC) $(CFLAGS) $(CLIBS) -o $(TARGET) libkytimer.c - mkdir -p lib/ - mv $(TARGET) lib/$(LIBINSTALLNAME) - -clean: - -rm ../lib/$(LIBINSTALLNAME) - -target_install:TARGET - cp $(LIBINSTALLNAME) $(LIBINSTALLDIR) diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index 2ab4e7f..3319478 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -4,8 +4,8 @@ set_target_properties(kyutils PROPERTIES VERSION 2.0.0 SOVERSION 1) include_directories(.) install(TARGETS kyutils DESTINATION ${CMAKE_INSTALL_RPATH}) -# install(FILES sdkmarcos.h kerr.h cstring-extension.h -# DESTINATION include/kysdk/kysdk-base) +install(FILES sdkmarcos.h kerr.h cstring-extension.h kyutils.h + DESTINATION include/kysdk/kysdk-base) add_executable(test-utils sample/kyutils_sample.c) target_link_libraries(test-utils kyutils)