File: Makefile

package info (click to toggle)
twpsk 2.1-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 944 kB
  • ctags: 1,477
  • sloc: cpp: 9,057; makefile: 187; sh: 4
file content (95 lines) | stat: -rw-r--r-- 2,884 bytes parent folder | download
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Path settings for 'make install'
# cod-file will be searched in DATADIR, $(HOME) and current directory
# ini-file will be searched in $(HOME), current directory and DATADIR
BINDIR = $(DESTDIR)/usr/bin
DATADIR = $(DESTDIR)/usr/share/psk31lx
MANDIR = $(DESTDIR)/usr/share/man/man1
DOCDIR = $(DESTDIR)/usr/share/doc/psk31lx

CC = g++ 
LD = g++
CXXFLAGS = -Wall -O2 -g
LDFLAGS = -v -H

#############################################################################
## If you change these lines, you have to do a "make clean"!!!
##
## Uncomment these two lines for recommended mode with pthread library
LIBS = -lncurses -lm -lpthread
CXXFLAGS += -DUSE_PTHREAD
##
## Uncomment this line for operation without phreads
## This will only work for "make twpsk"
## making "psk31lx" will currently fail!
## (Well, it compiles, but the executable does not work...)
##LIBS = -lncurses -lm
#############################################################################
export CXXFLAGS

OBJS = psk31-coder.o psk31-receiver.o psk31-transmitter.o psk31-main.o window.o
# OBJS += hansis-fft.o
FILES = README Changes Makefile *.C *.h psk31.ini psk31.cod psk31.1

TWPSKLIBDIRS   =     -L/usr/X11R6/lib
TWPSKLIBS      =     -lXm -lXt -lX11 -lXp -lXext -lXpm -lm

TWPSKBINDIR = $(DESTDIR)/usr/bin
TWPSKMANDIR = $(DESTDIR)/usr/share/man/man1
TWPSKDOCDIR = $(DESTDIR)/usr/share/doc/twpsk
TWPSKAPPDIR = $(DESTDIR)/etc/X11/app-defaults
TWPSKDATADIR = $(DESTDIR)/usr/share/twpsk

all:	 twpsk psk31lx

psk31lx:	modes_d server_d user_d 
	$(LD) $(LDFLAGS) $(LIBS) modes/*.o user/*.o server/server-main.o -o psk31lx

twpsk:	modes_d server_d twpsk_d
	$(LD)  $(LDFLAGS) $(LIBS) $(TWPSKLIBDIRS) $(TWPSKLIBS) modes/*.o server/server-main.o user-twpsk/*.o -o twpsk

modes_d:
	(cd modes; $(MAKE))

twpsk_d:
	(cd user-twpsk; $(MAKE))

user_d:
	(cd user; $(MAKE) direct)

server_d:
	(cd server; $(MAKE) direct)

arch:	$(FILES)
	tar -cvzf psk31lx.tgz $(FILES)

rpm:	
	tar -cvzf /usr/src/packages/SOURCES/twpsk-V1.1.tar.gz $(FILES)
	rpm -ba /usr/src/packages/SPECS/twpsk-1.1-1.spec

install:
	install -d $(BINDIR)
	install -d $(DATADIR)
	install -d $(MANDIR)
	install -d $(DOCDIR)
	install -s psk31lx $(BINDIR)
	install -m 0644 psk31.ini psk31.cod $(DATADIR)
	install -m 0644 README $(DOCDIR)
	install -m 0644 debian/psk31lx.1 $(MANDIR)

install_twpsk:
	install -d $(TWPSKBINDIR)
	install -d $(TWPSKAPPDIR)
	install -d $(TWPSKDATADIR)
	install -d $(TWPSKMANDIR)
	install -d $(TWPSKDOCDIR)
	install -m 0644 user-twpsk/twpskDir/* $(TWPSKDATADIR)
	install -m 0644 user-twpsk/Twpsk $(TWPSKAPPDIR)
	install -m 0644 debian/twpsk.1 $(TWPSKMANDIR)
	install -m 0644 user-twpsk/CHANGES $(TWPSKDOCDIR)/changelog
	install -m 0644 user-twpsk/README $(TWPSKDOCDIR)
	install -m 0644 user-twpsk/twpskHelp $(TWPSKDATADIR)
	install -m 0644 psk31.cod $(TWPSKDATADIR)
	install -s twpsk $(TWPSKBINDIR)

clean:
	/bin/rm -f */*.o psk31lx twpsk core