| 1 | # SPDX-FileCopyrightText: 2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
| 2 | # |
| 3 | # SPDX-License-Identifier: MIT |
| 4 | |
| 5 | # This makefile is purposefully kept simple to support GNU and BSD make. |
| 6 | |
| 7 | LOCAL_CFLAGS := -g -O2 -Wall |
| 8 | AM_V_P := : |
| 9 | |
| 10 | all: $(BINARY) |
| 11 | |
| 12 | $(BINARY): $(OBJECTS) |
| 13 | @verbose="$(AM_V_P)"; if [ "x$$verbose" = "x" ]; then verbose=":"; fi; \ |
| 14 | if $$verbose; then set -x; else echo " CCLD $@"; fi; \ |
| 15 | $(CC) $(LOCAL_CFLAGS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ |
| 16 | -o $@ $(OBJECTS) $(LIBS) |
| 17 | |
| 18 | $(OBJECTS): $(SOURCES) $(DEPS) |
| 19 | @verbose="$(AM_V_P)"; if [ "x$$verbose" = "x" ]; then verbose=":"; fi; \ |
| 20 | if $$verbose; then set -x; else echo " CC $@"; fi; \ |
| 21 | $(CC) $(LOCAL_CFLAGS) $(AM_CFLAGS) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) \ |
| 22 | -c -o $@ $(SOURCES) |
| 23 | |
| 24 | .PHONY: clean |
| 25 | clean: |
| 26 | rm -f *.o $(BINARY) |