Skip to content

Commit

Permalink
Use CPPFLAGS, CFLAGS and LDFLAGS from environment for posix/snek build
Browse files Browse the repository at this point in the history
Inherit compiler flags during Debian build process

Signed-off-by: Keith Packard <keithp@keithp.com>
  • Loading branch information
keith-packard committed Mar 5, 2019
1 parent 16c8d3a commit 292c27d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions posix/Makefile
Expand Up @@ -24,16 +24,16 @@ SNEK_LOCAL_BUILTINS = snek-posix.builtin

include $(SNEK_ROOT)/snek-install.defs

OPT=-O0
OPT?=-O0

CFLAGS=-DSNEK_MEM_INCLUDE_NAME $(OPT) -g -I. $(SNEK_CFLAGS) -Werror
CFLAGS+=-DSNEK_MEM_INCLUDE_NAME $(OPT) -g -I. $(SNEK_CFLAGS) -Werror $(CPPFLAGS)

LIBS=-lreadline -lm

all: snek snek.desktop

snek: $(SNEK_OBJ)
$(CC) $(CFLAGS) -o $@ $(SNEK_OBJ) $(LIBS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SNEK_OBJ) $(LIBS)

install: snek snek.1
install -d $(DESTDIR)$(BINDIR)
Expand Down
2 changes: 1 addition & 1 deletion snek.defs
Expand Up @@ -85,7 +85,7 @@ $(SNEK_OBJ): $(SNEK_INC)

ifndef quiet

V=0
V?=0
# The user has explicitly enabled quiet compilation.
ifeq ($(V),0)
quiet = @printf " $1 $2 $@\n"; $($1)
Expand Down

0 comments on commit 292c27d

Please sign in to comment.