Makefile 573 B

123456789101112131415161718192021222324
  1. # SPDX-FileCopyrightText: 2019 Helmut Pozimski <helmut@pozimski.eu>
  2. #
  3. # SPDX-License-Identifier: GPL-2.0-only
  4. CC ?= gcc
  5. CFLAGS ::= $(CFLAGS) -std=c99 -O2 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wall -pedantic
  6. DEPS = src/wavfile.h src/tcpserver.h
  7. build/%.o: src/%.c $(DEPS)
  8. $(CC) -c -o $@ $< $(CFLAGS)
  9. build/tpr: build/wavfile.o build/main.o build/tcpserver.o
  10. $(CC) -o build/tpr build/wavfile.o build/main.o build/tcpserver.o
  11. all:
  12. build/tpr
  13. .PHONY: clean
  14. clean:
  15. rm -f build/*.o
  16. rm -f build/tpr
  17. install: build/tpr
  18. install -m 0755 -s build/tpr $(PREFIX)/bin