]> pd.if.org Git - zpackage/commitdiff
enable building of zpm-shell
authorNathan Wagner <nw@hydaspes.if.org>
Thu, 4 Jan 2018 16:19:34 +0000 (10:19 -0600)
committerNathan Wagner <nw@hydaspes.if.org>
Tue, 10 Apr 2018 07:09:13 +0000 (02:09 -0500)
.gitignore
Makefile

index a12496ee2e0e8ec6c5214331ea7957af41759339..cf56615f5abfde217838f63f87cd1fbb98d3a019 100644 (file)
@@ -10,6 +10,7 @@ zpm-soneed
 zpm-hash
 zpm-stat
 zpm-findpkg
+zpm-shell
 *.zpm
 *.db
 soname
index 09a6e80f33a66a431ead127278feb735a99cfee7..7595154acbc77079899420210029c0eb7ba80313 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -65,7 +65,10 @@ newdb.c: db.sql
        xxd -i < $< >> $@
        echo ", 0};" >> $@
 
-lib/sqlite3.o: lib/sqlite3.c lib/config.h
+sqlite/sqlite3.o: sqlite/sqlite3.c sqlite/config.h
+       $(CC) -Wall -std=c99 -Ilib -D_HAVE_SQLITE_CONFIG_H=1 -c -o $@ $<
+
+sqlite/shell.o: sqlite/shell.c sqlite/config.h
        $(CC) -Wall -std=c99 -Ilib -D_HAVE_SQLITE_CONFIG_H=1 -c -o $@ $<
 
 $(LZMAOBJ):
@@ -76,9 +79,13 @@ lib/zpm.o: newdb.c
 zpm-vercmp: zpm-vercmp.o lib/vercmp.o
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+
        
+zpm-shell: sqlite/sqlite3.o sqlite/shell.o
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+
+
 libzpm.a: lib/sha256.o lib/db.o lib/compress.o lib/uncompress.o lib/zpm.o \
-       lib/sqlite3.o \
+       sqlite/sqlite3.o \
        lib/vercmp.o \
+       lib/sha256.o \
        $(LZMAOBJ)
        ar rcuv $@ $?