forked from ec429/3psk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (44 loc) · 1.47 KB
/
Makefile
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
48
49
50
51
52
53
54
# Makefile for 3psk, 3-pole Phase Shift Keying
CC := gcc
CFLAGS := -Wall -Wextra -Werror -pedantic -std=gnu99 -g `sdl-config --cflags`
LIBS := -lm -lfftw3 `sdl-config --libs` -lSDL_ttf -lSDL_audioin -latg
OBJS := bits.o varicode.o strbuf.o gui.o audio.o ptt.o
INCLUDES := $(OBJS:.o=.h) frontend.h
VERSION := `git describe --tags`
all: 3psk
3psk: 3psk.c $(INCLUDES) $(OBJS)
$(CC) $(CFLAGS) $(CPPFLAGS) $< $(LDFLAGS) $(LIBS) $(OBJS) -o $@
%.o: %.c %.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
varicode.o: strbuf.h
gui.o: frontend.h
audio.o: bits.h
clean:
-rm 3psk *.o
dist: all
mkdir 3psk_$(VERSION)
-for p in $$(ls); do cp $$p 3psk_$(VERSION)/$$p; done;
-rm 3psk_$(VERSION)/*.tgz
-rm 3psk_$(VERSION)/*.zip
-rm 3psk_$(VERSION)/*.wav
tar -czf 3psk_$(VERSION).tgz 3psk_$(VERSION)/
rm -r 3psk_$(VERSION)/
dists: all
mkdir 3psk_$(VERSION)_src
-for p in *.c *.h Makefile *.htm screenshot.png sample.conf; do cp $$p 3psk_$(VERSION)_src/$$p; done;
tar -czf 3psk_$(VERSION)_src.tgz 3psk_$(VERSION)_src/
rm -r 3psk_$(VERSION)_src/
distw: all
rm -rf 3psk_w$(VERSION)
mkdir 3psk_w$(VERSION)
-for p in $$(ls); do cp $$p 3psk_w$(VERSION)/$$p; done;
-for p in $$(ls wbits); do cp wbits/$$p 3psk_w$(VERSION)/$$p; done;
-rm 3psk_w$(VERSION)/*.tgz
-rm 3psk_w$(VERSION)/*.zip
-rm 3psk_w$(VERSION)/*.wav
-rm 3psk_w$(VERSION)/*.o
-rm 3psk_w$(VERSION)/3psk
make -C 3psk_w$(VERSION) -fMakefile.w32 all
-rm 3psk_w$(VERSION).zip
zip -r 3psk_w$(VERSION).zip 3psk_w$(VERSION)
rm -r 3psk_w$(VERSION)/