add Makefile

This commit is contained in:
Lion 2022-06-29 15:16:16 +08:00
parent bcf12a41db
commit 257c391912
3 changed files with 16 additions and 8 deletions

3
.gitignore vendored
View File

@ -37,7 +37,8 @@ META-INF/
/binding/java/target/
/binding/java/*.jar
/binding/c/testSearcher
/binding/c/xdb_searcher
/binding/c/util_test
/binding/c/cmake-build-debug
# golang

View File

@ -1,7 +0,0 @@
cmake_minimum_required(VERSION 3.22)
project(c C)
set(CMAKE_C_STANDARD 11)
add_executable(c
xdb_searcher.c xdb_searcher.h)

14
binding/c/Makefile Normal file
View File

@ -0,0 +1,14 @@
all: xdb_searcher util_test
xdb_searcher: xdb_searcher.h xdb_searcher.c main.c
gcc -g -O2 -I./ xdb_searcher.c main.c -o xdb_searcher
util_test: xdb_searcher.h xdb_searcher.c util_test.c
gcc -g -O2 -I./ xdb_searcher.c util_test.c -o util_test
clean:
find ./ -name \*.o | xargs rm -f
find ./ -name util_test | xargs rm -f
find ./ -name xdb_searcher | xargs rm -f
.PHONY: all clean xdb_searcher util_test