1# 2# Copyright 2017, Data61 3# Commonwealth Scientific and Industrial Research Organisation (CSIRO) 4# ABN 41 687 119 230. 5# 6# This software may be distributed and modified according to the terms of 7# the BSD 2-Clause license. Note that NO WARRANTY is provided. 8# See "LICENSE_BSD2.txt" for details. 9# 10# @TAG(DATA61_BSD) 11# 12default: prune 13 14ifeq (0${V},0) 15Q := @ 16else 17Q := 18endif 19 20CFLAGS += -W -Wall -Wextra -Wno-switch -Wno-unused-parameter -std=gnu1x 21 22# Glib. The user is expected to have already set CFLAGS to contain any 23# LLVM-required stuff. 24CFLAGS += $(shell pkg-config --cflags --libs glib-2.0) 25 26prune: cfg.o dict.o main.o set.o 27 @echo " [LD] $@" 28 ${Q}${CC} -o $@ $^ ${CFLAGS} -lclang 29 30cfg.o: dict.h 31dict.o: dict.h 32main.o: set.h 33set.o: set.h 34 35%.o: %.c 36 @echo " [CC] $@" 37 ${Q}${CC} ${CFLAGS} -c -o $@ $< 38 39clean: 40 @echo " [CLEAN] prune *.o" 41 ${Q}rm -f prune *.o 42