| 1 |
# this assumes a recent system -- you're using GNU make right ? |
| 2 |
|
| 3 |
# POSIX make doesn't support default values, so we export from here. |
| 4 |
CFLAGS ?= -O2 -g |
| 5 |
CFLAGS += -Wall |
| 6 |
export CFLAGS |
| 7 |
|
| 8 |
compress cleanup install install_core install_extra: Makefile |
| 9 |
$(MAKE) -f Makefile $@ |
| 10 |
|
| 11 |
clean: cleanup |
| 12 |
distclean: cleanup |
| 13 |
rm -f Makefile |
| 14 |
|
| 15 |
Makefile: Makefile.def GNUmakefile |
| 16 |
sed \ |
| •17 |
-e 's:options= :options= -DUTIME_H :' \ |
| 18 |
Makefile.def > Makefile |
| 19 |
|
| 20 |
check: |
| 21 |
./tests/runtests.sh |
| 22 |
|
| 23 |
PN = ncompress |
| 24 |
PV := $(shell awk '{print $$NF; exit}' Changes) |
| 25 |
PATCHVER := $(shell awk '{print $$NF; exit}' patchlevel.h | cut -d\" -f1) |
| 26 |
ifneq ($(PV),$(PATCHVER)) |
| 27 |
$(error Changes has version $(PV) but patchlevel.h has $(PATCHVER)) |
| 28 |
endif |
| 29 |
P = $(PN)-$(PV) |
| 30 |
dist: |
| 31 |
git archive --prefix=$(P)/ HEAD | gzip -9 > $(P).tar.gz |
| 32 |
|
| 33 |
.PHONY: check clean cleanup compress dist distclean install |