12345678910111213141516171819202122232425262728 |
- # SPDX-FileCopyrightText: 2019 Helmut Pozimski <helmut@pozimski.eu>
- #
- # SPDX-License-Identifier: GPL-2.0-only
- CC ?= gcc
- CFLAGS ::= $(CFLAGS) -std=c99 -O2 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -D_POSIX_C_SOURCE -Wall -pedantic
- DEPS = src/wavfile.h src/tcpserver.h build
- PREFIX ?= /usr/local
- build/%.o: src/%.c $(DEPS)
- $(CC) -c -o $@ $< $(CFLAGS)
- build/tpr: build/wavfile.o build/main.o build/tcpserver.o
- $(CC) -o build/tpr build/wavfile.o build/main.o build/tcpserver.o
- build:
- mkdir build
- all:
- build/tpr
- .PHONY: clean
- clean:
- rm -f build/*.o
- rm -f build/tpr
- install: build/tpr
- install -m 0755 -s build/tpr $(PREFIX)/bin
|