diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-03-23 22:35:50 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-03-23 23:07:32 +0100 |
| commit | 62ca03b94f09ddedc042bd5ac7bfa79215d7c380 (patch) | |
| tree | 6a6e3fc72585403ecb65a7b8a6342fd35a7d9c48 /GNUmakefile | |
| parent | d67ce0cb9c0f807f90b964abe5be1173ac10ff7f (diff) | |
| download | vis-62ca03b94f09ddedc042bd5ac7bfa79215d7c380.tar.gz vis-62ca03b94f09ddedc042bd5ac7bfa79215d7c380.tar.xz | |
build: fix make local, improve make standalone
The local target should use the system curses library not a custom
build one. Also the two targets are now compatible with each other,
meaning that the relevant libraries are correctly rebuilt from
scratch against the correct libc.
Diffstat (limited to 'GNUmakefile')
| -rw-r--r-- | GNUmakefile | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/GNUmakefile b/GNUmakefile index af39707..2cb5acd 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -137,11 +137,31 @@ dependency/build/liblpeg-install: dependency/build/liblpeg-build dependency/buil cp $(dir $<)/$(LIBLPEG)/*.o $(dir $<)/$(LIBLUA)/src touch $@ -dependencies: dependency/build/libtermkey-install dependency/build/liblua-install dependency/build/liblpeg-install +dependencies-common: dependency/build/libtermkey-install dependency/build/liblua-install dependency/build/liblpeg-install -dependencies-full: dependency/build/libncurses-install dependencies +dependency/build/local: dependencies-common + touch $@ + +dependency/build/standalone: dependency/build/libncurses-install dependencies-common + touch $@ + +dependencies-clean: + rm -rf dependency/build/*curses* + rm -rf dependency/build/libtermkey* + rm -rf dependency/build/*lua* + rm -rf dependency/build/*lpeg* + rm -f dependency/build/local + rm -f dependency/build/standalone + +local: clean + [ ! -e dependency/build/standalone ] || $(MAKE) dependencies-clean + mkdir -p dependency/build && \ + touch dependency/build/libncurses-extract && \ + touch dependency/build/libncurses-configure && \ + touch dependency/build/libncurses-build && \ + touch dependency/build/libncurses-install -local: clean dependencies + $(MAKE) dependency/build/local $(MAKE) CFLAGS="$(CFLAGS) -I$(DEPS_INC)" LDFLAGS="$(LDFLAGS) -L$(DEPS_LIB)" \ CFLAGS_CURSES="-I/usr/include/ncursesw" LDFLAGS_CURSES="-lncursesw" \ CFLAGS_TERMKEY= LDFLAGS_TERMKEY=-ltermkey \ @@ -150,15 +170,17 @@ local: clean dependencies @echo Run with: LD_LIBRARY_PATH=$(DEPS_LIB) ./vis standalone: clean dependency/build/libmusl-install + [ ! -e dependency/build/local ] || $(MAKE) dependencies-clean PATH=$(DEPS_BIN):$$PATH PKG_CONFIG_PATH= PKG_CONFIG_LIBDIR= $(MAKE) \ - CC=musl-gcc dependencies-full + CC=musl-gcc dependency/build/standalone PATH=$(DEPS_BIN):$$PATH PKG_CONFIG_PATH= PKG_CONFIG_LIBDIR= $(MAKE) \ CC=musl-gcc CFLAGS="--static -Wl,--as-needed" \ CFLAGS_CURSES= LDFLAGS_CURSES="-lncursesw" \ CFLAGS_TERMKEY= LDFLAGS_TERMKEY=-ltermkey \ CFLAGS_LUA="-DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -DLUA_COMPAT_ALL" \ LDFLAGS_LUA="-llua -lm -ldl" \ + CFLAGS_AUTO=-Os LDFLAGS_AUTO= \ CONFIG_ACL=0 CFLAGS_ACL= LDFLAGS_ACL= \ CONFIG_SELINUX=0 CFLAGS_SELINUX= LDFLAGS_SELINUX= -.PHONY: standalone dependencies dependencies-full local
\ No newline at end of file +.PHONY: standalone local dependencies-common dependencies-clean |
