don't link libstdc++ static
This commit is contained in:
badaix 2015-08-03 21:48:13 +02:00
parent f448032fc4
commit e2d832ae56
2 changed files with 43 additions and 41 deletions

View file

@ -1,9 +1,9 @@
VERSION = 0.2.1 VERSION = 0.2.91
TARGET = snapclient TARGET = snapclient
SHELL = /bin/bash SHELL = /bin/bash
CC = /usr/bin/g++ CC = /usr/bin/g++
CFLAGS = -std=c++0x -static-libgcc -static-libstdc++ -Wall -Wno-unused-function -O3 -D_REENTRANT -DVERSION=\"$(VERSION)\" -I.. CFLAGS = -std=c++0x -Wall -Wno-unused-function -O3 -D_REENTRANT -DVERSION=\"$(VERSION)\" -I.. # -static-libgcc -static-libstdc++
LDFLAGS = -lrt -lpthread -lboost_system -lboost_program_options -lasound -logg -lvorbis -lvorbisenc -lFLAC -lavahi-client -lavahi-common LDFLAGS = -lrt -lpthread -lboost_system -lboost_program_options -lasound -logg -lvorbis -lvorbisenc -lFLAC -lavahi-client -lavahi-common
OBJ = snapClient.o stream.o alsaPlayer.o clientConnection.o timeProvider.o oggDecoder.o pcmDecoder.o flacDecoder.o controller.o browseAvahi.o ../message/pcmChunk.o ../common/log.o ../message/sampleFormat.o OBJ = snapClient.o stream.o alsaPlayer.o clientConnection.o timeProvider.o oggDecoder.o pcmDecoder.o flacDecoder.o controller.o browseAvahi.o ../message/pcmChunk.o ../common/log.o ../message/sampleFormat.o
@ -35,18 +35,18 @@ install: $(TARGET) uninstall
installsystemd: installsystemd:
@echo using systemd; \ @echo using systemd; \
cp ./snapclient /usr/sbin/snapclient; \ cp ./$(BIN) /usr/sbin/$(BIN); \
cp ../init.scripts/systemd/snapclient.service /lib/systemd/system/snapclient.service; \ cp ../init.scripts/systemd/$(BIN).service /lib/systemd/system/$(BIN).service; \
systemctl daemon-reload; \ systemctl daemon-reload; \
systemctl enable snapclient; \ systemctl enable $(BIN); \
systemctl start snapclient; \ systemctl start $(BIN); \
installsysv: installsysv:
@echo using sysv; \ @echo using sysv; \
cp ./snapclient /usr/sbin/snapclient; \ cp ./$(BIN) /usr/sbin/$(BIN); \
cp ../init.scripts/sysv/snapclient /etc/init.d/snapclient; \ cp ../init.scripts/sysv/$(BIN) /etc/init.d/$(BIN); \
update-rc.d snapclient defaults; \ update-rc.d $(BIN) defaults; \
/etc/init.d/snapclient start; \ /etc/init.d/$(BIN) start; \
uninstall: uninstall:
@ -62,17 +62,17 @@ uninstall:
fi; \ fi; \
uninstallsysv: uninstallsysv:
@/etc/init.d/snapclient stop; \ @/etc/init.d/$(BIN) stop; \
killall -9 snapclient; \ killall -9 $(BIN); \
rm -f /usr/sbin/snapclient; \ rm -f /usr/sbin/$(BIN); \
rm -f /etc/init.d/snapclient; \ rm -f /etc/init.d/$(BIN); \
update-rc.d -f snapclient remove; \ update-rc.d -f $(BIN) remove; \
uninstallsystemd: uninstallsystemd:
@systemctl stop snapclient; \ @systemctl stop $(BIN); \
systemctl disable snapclient; \ systemctl disable $(BIN); \
killall -9 snapclient; \ killall -9 $(BIN); \
rm -f /usr/sbin/snapclient; \ rm -f /usr/sbin/$(BIN); \
rm -f /lib/systemd/system/snapclient.service; \ rm -f /lib/systemd/system/$(BIN).service; \
systemctl daemon-reload; \ systemctl daemon-reload; \

View file

@ -1,4 +1,5 @@
VERSION = 0.2.1 VERSION = 0.2.91
TARGET = snapserver
SHELL = /bin/bash SHELL = /bin/bash
CC = /usr/bin/g++ CC = /usr/bin/g++
@ -8,9 +9,9 @@ LDFLAGS = -lrt -lpthread -lboost_system -lboost_program_options -lvorbis -lvorbi
OBJ = snapServer.o controlServer.o flacEncoder.o pcmEncoder.o oggEncoder.o serverSession.o publishAvahi.o pipeReader.o encoderFactory.o ../common/log.o ../message/pcmChunk.o ../message/sampleFormat.o OBJ = snapServer.o controlServer.o flacEncoder.o pcmEncoder.o oggEncoder.o serverSession.o publishAvahi.o pipeReader.o encoderFactory.o ../common/log.o ../message/pcmChunk.o ../message/sampleFormat.o
BIN = snapserver BIN = snapserver
all: server all: $(TARGET)
server: $(OBJ) $(TARGET): $(OBJ)
$(CC) $(CFLAGS) -o $(BIN) $(OBJ) $(LDFLAGS) $(CC) $(CFLAGS) -o $(BIN) $(OBJ) $(LDFLAGS)
strip $(BIN) strip $(BIN)
@ -31,20 +32,21 @@ install: $(TARGET) uninstall
echo cannot tell; \ echo cannot tell; \
fi; \ fi; \
installsystemd: installsystemd:
@echo using systemd; \ @echo using systemd; \
cp ./snapserver /usr/sbin/snapserver; \ cp ./$(BIN) /usr/sbin/$(BIN); \
cp ../init.scripts/systemd/snapserver.service /lib/systemd/system/snapserver.service; \ cp ../init.scripts/systemd/$(BIN).service /lib/systemd/system/$(BIN).service; \
systemctl daemon-reload; \ systemctl daemon-reload; \
systemctl enable snapserver; \ systemctl enable $(BIN); \
systemctl start snapserver; \ systemctl start $(BIN); \
installsysv: installsysv:
@echo using sysv; \ @echo using sysv; \
cp ./snapserver /usr/sbin/snapserver; \ cp ./$(BIN) /usr/sbin/$(BIN); \
cp ../init.scripts/sysv/snapserver /etc/init.d/snapserver; \ cp ../init.scripts/sysv/$(BIN) /etc/init.d/$(BIN); \
update-rc.d snapserver defaults; \ update-rc.d $(BIN) defaults; \
/etc/init.d/snapserver start; \ /etc/init.d/$(BIN) start; \
uninstall: uninstall:
@ -59,16 +61,16 @@ uninstall:
fi; \ fi; \
uninstallsysv: uninstallsysv:
@/etc/init.d/snapserver stop; \ @/etc/init.d/$(BIN) stop; \
killall -9 snapserver; \ killall -9 $(BIN); \
rm -f /usr/sbin/snapserver; \ rm -f /usr/sbin/$(BIN); \
rm -f /etc/init.d/snapserver; \ rm -f /etc/init.d/$(BIN); \
update-rc.d -f snapserver remove; \ update-rc.d -f $(BIN) remove; \
uninstallsystemd: uninstallsystemd:
@systemctl stop snapserver; \ @systemctl stop $(BIN); \
systemctl disable snapserver; \ systemctl disable $(BIN); \
killall -9 snapserver; \ killall -9 $(BIN); \
rm -f /usr/sbin/snapserver; \ rm -f /usr/sbin/$(BIN); \
rm -f /lib/systemd/system/snapserver.service; \ rm -f /lib/systemd/system/$(BIN).service; \
systemctl daemon-reload; \ systemctl daemon-reload; \