Newer
Older
ifneq ($(REALLY_USE_OBSOLETE_BUILD_SYSTEM),yes)
$(error This is the old build system. Use "scons" to build, or use $(MAKE) REALLY_USE_OBSOLETE_BUILD_SYSTEM=yes)
endif
# Check to make sure variables are properly set
ifeq ($(TOPLEVEL),)
$(error $$TOPLEVEL is unset)
endif
include $(TOPLEVEL)/config.mk
Meredith L. Patterson
committed
TEST_CFLAGS = $(shell pkg-config --cflags glib-2.0) -DINCLUDE_TESTS
TEST_LDFLAGS = $(shell pkg-config --libs glib-2.0) -lrt -ldl
CFLAGS := -std=gnu99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-attributes -g
ifsilent = $(if $(findstring 0, $(V)),$(1),)
hush = $(call ifsilent,$(HUSH) $(1))
.DEFAULT_GOAL:=all
%.a: $(call ifsilent,| $(HUSH))
$(call hush,"Archiving $@") ar cr $@ $^
%.o: %.c $(call ifsilent,| $(HUSH))
$(call hush, "Compiling $<") $(CC) $(CFLAGS) -c -o $@ $<
clean:
-rm -f $(OUTPUTS)
make -C $(TOPLEVEL)/lib hush