summaryrefslogblamecommitdiffstats
path: root/makefile
blob: eac2b44898445c888b8fcde60cf97af7264d462f (plain) (tree)
1
2
3
4
5
6
7
8
9
10




                                                                         
                                 



                                                                   


                                                                             


                                                                       


                                                                             


                                     






                                    
                                      




                                                                                                                                             
DESTDIR=/
CC=cc
MYCFLAGS=-O0 -Wall -Wextra -Wformat -pedantic -g -I. # -fsanitize=address
MYLDFLAGS=

default: ptt naprave fourier zvok

ptt: ptt.c
	$(CC) $(MYCFLAGS) $(CFLAGS) $< -o$@ $(MYLDFLAGS) $(LDFLAGS)

naprave: naprave.c
	$(CC) $(MYCFLAGS) $(CFLAGS) $< -o$@ $(MYLDFLAGS) $(LDFLAGS) -lsoundio

fourier: fourier.c frekvence.h
	$(CC) $(MYCFLAGS) $(CFLAGS) $< -o$@ $(MYLDFLAGS) $(LDFLAGS) -lm

zvok: zvok.c
	$(CC) $(MYCFLAGS) $(CFLAGS) $< -o$@ $(MYLDFLAGS) $(LDFLAGS) -lsoundio

frekvence.h: frekvence.php
	./frekvence.php > frekvence.h

install:
	mkdir -p $(DESTDIR)/usr/bin/
	cp ptt $(DESTDIR)/usr/bin/

distclean: clean

clean:
	rm -rf tmp fourier frekvence.h

valgrind:
	valgrind --error-exitcode=59 --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt $(CMD)

.PHONY: default install distclean clean valgrind