Newer
Older
CFLAGS := $(shell pkg-config --cflags glib-2.0) -std=gnu99 -Wall -Wextra -Werror
LDFLAGS := $(shell pkg-config --libs glib-2.0)
CC := gcc
CFLAGS += -DINCLUDE_TESTS
HUSH = $(TOPLEVEL)/lib/hush
# Check to make sure variables are properly set
ifeq ($(TOPLEVEL),)
$(error $$TOPLEVEL is unset)
endif
#.SUFFIXES:
.DEFAULT_GOAL:=all
ifeq ($(V),0)
# silent mode
%.o: %.c | $(HUSH)
$(HUSH) "Compiling $<" $(CC) $(CFLAGS) -c -o $@ $<
else
$(CC) $(CFLAGS) -c -o $@ $<
clean:
-rm -f $(OUTPUTS)
$(TOPLEVEL)/lib/hush: $(TOPLEVEL)/lib/hush.c
make -C $(TOPLEVEL)/lib hush