-CFLAGS=-Wall -W -Wextra -Werror -std=c99 -Ilib -Isqlite -Ielf -I. -Ilzma/api
+CFLAGS=-Wall -W -Wextra -Werror -Wno-implicit-fallthrough -std=c99 -Ilib -Isqlite -Ielf -I. -Ilzma/api
ZPMVER:=$(shell git tag --list 'v[0-9]*' | sed -e 's/^v//' | sort -nr | head -1)
ifeq ($(strip $(ZPMVER)),)
ZPM:= ./zpm -P scripts:bin:.
-zpm-0.1-1.zpm: programs scripts
+zpm-0.1-1.zpm: programs
rm -f $@
./zpm -P scripts:bin:. newpackage -f $@ -v 0.1 zpm
./zpm -P scripts:bin:. addtopackage -f $@ -P /usr/libexec/zpm -v 0.1 zpm $(PROGRAMS)
tarball: zpm-0.1-1.tar.xz
-zpm-0.1-1.tar.xz: programs scripts
+zpm-0.1-1.tar.xz: programs
rm -f $@
tar -cJf $@ --transform='s|^|usr/libexec/zpm/|' \
--transform='s|^usr/libexec/zpm/zpm$$|usr/bin/zpm|' \
test: $(ZPKGBIN)
PATH=$(curdir)/t:$(curdir):$(PATH) prove -e '' t/*.t
-programs: elftype soname zpm-soneed zpm-addfile zpm-extract zpm-init \
+programs: elftype zpm-soname zpm-soneed zpm-addfile zpm-extract zpm-init \
zpm-vercmp zpm-findpkg
uncompress: uncompress.o
elftype: elf/elftype.c
$(CC) $(CFLAGS) -o $@ $+
-soname: elf/soname.c
+zpm-soname: elf/soname.c
$(CC) -Ielf $(CFLAGS) -o $@ $+
zpm-soneed: elf/needed.c
libelf.a: elf/libelf.o
ar rcuv $@ $?
-install: elftype
- install -D zpm $(DESTDIR)/bin/zpm
- install -D zpm-note $(DESTDIR)/bin/zpm-note
- install -D zpm-bug $(DESTDIR)/bin/zpm-bug
- install -D zpm-sequence $(DESTDIR)/bin/zpm-sequence
- install -D zpm-preserve $(DESTDIR)/bin/zpm-preserve
- install -d -m2770 -o root -g adm $(DESTDIR)/var/lib/admin
- install -d -m2770 -o root -g adm $(DESTDIR)/var/lib/admin/notes
- install -d -m2770 -o root -g adm $(DESTDIR)/var/lib/admin/notes/open
- install -d -m2770 -o root -g adm $(DESTDIR)/var/lib/admin/notes/ack
- install -D elftype $(DESTDIR)/usr/sbin/elftype
- install -D soname $(DESTDIR)/usr/sbin/soname
- #SPOOL=$(DESTDIR)/var/lib/admin/notes ./zpm-sequence -c notes
+install: $(COMPILED)
+ test -d $(DESTDIR)/bin || install -d $(DESTDIR)/bin
+ install -D $(PROGRAMS) $(DESTDIR)/bin
clean:
rm -f *.o sqlite/*.o lib/*.o $(LZMAOBJ) liblzma.a \