Support static build
authorkazu <kazu@7b47e76f-e598-2f43-bc14-414d160cc389>
Tue, 16 Apr 2024 10:22:02 +0000 (10:22 +0000)
committerkazu <kazu@7b47e76f-e598-2f43-bc14-414d160cc389>
Tue, 16 Apr 2024 10:22:02 +0000 (10:22 +0000)
git-svn-id: file:///raid/svn-main/kazu-ksynth/trunk@22 7b47e76f-e598-2f43-bc14-414d160cc389

Makefile

index 0124adb5d999f149227cf9204eed78d94f1d2464..fa180ebca0c2e77fdd37607b6bd156053075e6a4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -30,9 +30,14 @@ ifdef WIN64
        $(CC) $(CFLAGS) -shared -o $@ $^
 endif
 else
-./out/ksynth_x64.so: $(OBJS)
+ifdef STATIC
+./out/libksynth.a: $(OBJS)
+       ar rcs $@ $^
+else
+./out/libksynth.so: $(OBJS)
        $(CC) $(CFLAGS) -shared -o $@ $^
 endif
+endif
 
 all:
        $(MAKE) -C . WIN32=YES