2020-12-31 02:32:52 +00:00
|
|
|
CFLAGS = -g -Wall
|
|
|
|
LDFLAGS = -L. -lrclone -lpthread -ldl
|
|
|
|
|
2021-02-26 10:41:38 +00:00
|
|
|
ctest: ctest.o librclone.a
|
2020-12-31 02:32:52 +00:00
|
|
|
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
|
|
|
|
|
|
|
|
ctest.o: ctest.c librclone.h
|
|
|
|
$(CC) $(CFLAGS) -c $^ $(LDFLAGS)
|
|
|
|
|
2021-02-26 10:41:38 +00:00
|
|
|
librclone.a librclone.h:
|
2020-12-31 02:32:52 +00:00
|
|
|
go build --buildmode=c-archive -o librclone.a github.com/rclone/rclone/librclone
|
|
|
|
|
2021-03-30 10:37:59 +00:00
|
|
|
test: ctest
|
|
|
|
./ctest
|
|
|
|
|
2020-12-31 02:32:52 +00:00
|
|
|
clean:
|
|
|
|
rm -f tmp ctest *.o *.a *.h *.gch
|