summaryrefslogtreecommitdiff
path: root/os2eindopdracht/makefile
blob: 87185b43479d3b7340efaa1724b65463d8762c2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
C++ = g++
LD = g++
RM = rm -f
CFLAGS = -std=c++20
LFLAGS =
TARGET = ate

SRCS := $(wildcard *.cpp)
OBJS := $(patsubst %.cpp,%.o, $(SRCS))
OBJS += usage.o

all: $(TARGET)

%.o: %.cpp
	$(C++) -c $(CFLAGS) $< -o $@

%.o: %.txt
	objcopy --input binary --output elf64-x86-64 $< $@

Arguments.o: usage.h

$(TARGET): $(OBJS)
	$(LD) $^ $(LFLAGS) -o $@

clean:
	$(RM) $(TARGET) $(OBJS)

compile_commands:
	compiledb make -Bn

original.pcm: original.flac
	./any2s16lepcm $< $@

edit.pcm: original.pcm $(TARGET)
	./$(TARGET) $< $@ -b-4 -t-18

edit.wav: edit.pcm
	./s16lepcm2any $< $@

original.wav: original.pcm
	./s16lepcm2any $< $@

edit.png: edit.wav
original.png: original.wav

%.png: %.wav
	sox $< -n spectrogram -o $@