Move source files to utils
This commit is contained in:
parent
89f614e6f3
commit
43e16ce945
6 changed files with 11 additions and 16 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1 +1,3 @@
|
|||
build
|
||||
*.o
|
||||
*.so
|
|
@ -8,10 +8,10 @@ set(CMAKE_CXX_STANDARD 17)
|
|||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
|
||||
# Add source files
|
||||
file(GLOB SOURCES "src/*.cpp")
|
||||
file(GLOB SOURCES "src/utils/*.cpp" "src/nbt/*.cpp")
|
||||
|
||||
# Add an executable target
|
||||
add_executable(ac ${SOURCES})
|
||||
# Add an shared library target
|
||||
add_library(ac SHARED ${SOURCES})
|
||||
|
||||
# Optionally, if you have any additional include directories or libraries, add them here:
|
||||
# target_include_directories(ac PRIVATE ${CMAKE_SOURCE_DIR}/include)
|
||||
|
|
16
Makefile
16
Makefile
|
@ -3,22 +3,16 @@ CXX = g++
|
|||
CXXFLAGS = -std=c++17 -Wall -Wextra
|
||||
|
||||
# Source files and target executable
|
||||
SRCS = $(wildcard src/*.cpp)
|
||||
OBJS = $(SRCS:.cpp=.o)
|
||||
TARGET = ac
|
||||
|
||||
# Build target
|
||||
all: $(TARGET)
|
||||
all: clean build
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) -o $@ $(OBJS)
|
||||
|
||||
# Build object files
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
build:
|
||||
mkdir build
|
||||
cd build && cmake .. && make && mv libac.so ..
|
||||
|
||||
# Clean up build artifacts
|
||||
clean:
|
||||
rm -f $(TARGET) $(OBJS)
|
||||
rm -rf build
|
||||
|
||||
.PHONY: all clean
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
add_library(ac SHARED Progress.cpp Progress.h)
|
Loading…
Reference in a new issue