X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=Makefile;h=bbc69913c556bd6013d9d3e7e0293b32c171db38;hb=18de5ac3f1e533d36a1c394a1381dfaa6f3ce201;hp=a294b3817d937c324377eb4551e931703fce20ed;hpb=33ef8ea6e32e935fa8bf62b62710b216a1ce9b40;p=zpackage diff --git a/Makefile b/Makefile index a294b38..bbc6991 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ curdir=$(shell pwd) ZPKGBIN=zpm-addfile zpm-extract zpm-init zpm-vercmp zpm-stat zpm-hash \ zpm-findpkg zpm-shell zpm-soneed zpm-foreach-path zpm-parse \ zpm-script zpm-soname zpm-syncfs zpm-packagehash zpm-verify \ - zpm-elftype zpm-quote zpm-note + zpm-elftype zpm-quote zpm-note zpm-search SCRIPTS=zpm zpm-install zpm-merge zpm-list zpm-preserve zpm-test zpm-log \ zpm-contents zpm-uninstall zpm-pathmod zpm-rmpackage zpm-newpackage \ @@ -75,13 +75,13 @@ ZPM:= ./zpm -P. zpm-$(ZPMVER)-1.zpm: programs rm -f $@ $(ZPM) newpackage -C zpm-$(ZPMVER)-1 - $(ZPM) add -u root -g root -f $@ -P /sbin zpm-$(ZPMVER)-1 $(sort $(PROGRAMS)) + $(ZPM) add -v -u root -g root -f $@ -P /sbin zpm-$(ZPMVER)-1 $(sort $(PROGRAMS)) tarball: zpm-$(ZPMVER)-1.tar.xz zpm-$(ZPMVER)-1.tar.xz: programs rm -f $@ - tar -cJf $@ --transform='s|^|bin/|' \ + tar -cJf $@ --transform='s|^|sbin/|' \ $(PROGRAMS) lzma.c: mklzma @@ -135,6 +135,7 @@ zpm-packagehash: zpm-packagehash.o libzpm.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -lelf zpm-foreach-path.o: CFLAGS+=-Wno-unused-parameter +zpm-script.o: CFLAGS+=-Wno-unused-parameter zpm-foreach-path: zpm-foreach-path.o libzpm.a sqlite/sqlite3.h $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -lelf @@ -142,6 +143,9 @@ zpm-foreach-path: zpm-foreach-path.o libzpm.a sqlite/sqlite3.h zpm-findpkg: zpm-findpkg.o libzpm.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -lelf +zpm-search: zpm-search.o libzpm.a + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -lelf + zpm-note: zpm-note.o libzpm.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -lelf @@ -160,11 +164,15 @@ newdb.c: db.sql echo ", 0};" >> $@ sqlite/sqlite3.o: sqlite/sqlite3.c sqlite/config.h - $(CC) -Wall -std=c99 -Ilib -D_HAVE_SQLITE_CONFIG_H=1 -c -o $@ $< + $(CC) -O3 -Wall -std=c99 -Ilib -D_HAVE_SQLITE_CONFIG_H=1 -c -o $@ $< -sqlite/shell.o: sqlite/shell.c sqlite/config.h +sqlite/extensions.o: sqlite/extensions.c + $(CC) -O3 -Wall -std=c99 -I. -DSQLITE_CORE=1 -c -o $@ $< + +sqlite/shell.o: sqlite/shell.c sqlite/config.h Makefile $(CC) -Wall -std=c99 -Ilib \ -DSQLITE_OMIT_LOAD_EXTENSION=1 \ + '-DSQLITE_SHELL_INIT_PROC(x)=zpm_setup_extensions(x)' \ -D_POSIX_C_SOURCE=200112L -c -o $@ $< lib/zpm.o: newdb.c @@ -172,16 +180,15 @@ 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 +zpm-shell: sqlite/sqlite3.o sqlite/shell.o sqlite/extensions.o lib/vercmp.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ - libelf.a: elf/libelf.o ar rcuv $@ $? install: $(COMPILED) - test -d $(DESTDIR)/bin || install -d $(DESTDIR)/bin - install -D $(PROGRAMS) $(DESTDIR)/bin + test -d $(DESTDIR)/sbin || install -d $(DESTDIR)/sbin + install $(PROGRAMS) $(DESTDIR)/sbin scan-prep: clean sqlite/sqlite3.o sqlite/shell.o lib/liblzma.a @echo scan-build -v -o report make -j10