Skip to content

Commit 7070b46

Browse files
committed
Restore example makefile target
1 parent 7c45d0a commit 7070b46

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

bindings/c/Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
OS := $(shell uname)
2+
CFLAGS := -Iinclude
3+
LDFLAGS := -lm
14
ARCHS_IOS = aarch64-apple-ios aarch64-apple-ios-sim
25
ARCHS_ANDROID = aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android
36
IOS_LIB_FILE = libsql_experimental.dylib
@@ -6,6 +9,17 @@ LIB_FILE = libsql_experimental.so
69
XCFRAMEWORK = libsql_experimental.xcframework
710
HEADER = libsql.h
811

12+
ifeq ($(OS),Darwin)
13+
CFLAGS += -framework Security -framework CoreServices
14+
endif
15+
16+
.PHONY: all $(ARCHS_IOS) ios $(ARCHS_ANDROID) android
17+
18+
all: example
19+
20+
example: example.c
21+
$(CC) -o $@ $(CFLAGS) $< $(LIBSQL_EXPERIMENTAL_PATH) $(LDFLAGS)
22+
923
notify:
1024
osascript -e 'display notification "Build completed" with title "libsql"'
1125
echo "🟢 Build Completed!"

0 commit comments

Comments
 (0)