1 # -*- mode: makefile; -*-
4 PACKAGE := SESSION_MANAGER
5 BIN_NAME := non-session-manager
9 SRCS := $(wildcard src/*.C src/*.fl)
10 # SRCS += util/debug.C util/Thread.C util/file.C
17 CFLAGS += $(LIBLO_CFLAGS) $(XPM_CFLAGS) $(FLTK_CFLAGS) -D_GNU_SOURCE
19 src/nsmd: src/nsmd.o nonlib/libnonlib.a
20 @ echo -n Linking session handler.
21 @ $(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS) -Lnonlib -lnonlib && echo $(DONE)
23 src/session-manager: src/session-manager.o nonlib/libnonlib.a $(FLTK_LIBS)
24 @ echo -n Linking session handler.
25 @ $(CXX) $(CXXFLAGS) $^ -o $@ $(FLTK_LDFLAGS) $(XPM_LIBS) $(LIBS) -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE)
27 src/nsm-proxy: src/nsm-proxy.o nonlib/libnonlib.a
28 @ echo -n Linking NSM Proxy.
29 @ $(CXX) $(CXXFLAGS) $^ -o $@ $(LIBLO_LIBS) -Lnonlib -lnonlib && echo $(DONE)
32 # @ cd src && $(FLUID) -c NSM_Proxy_UI.fl
34 src/nsm-proxy-gui: src/NSM_Proxy_UI.o src/nsm-proxy-gui.o $(FLTK_LIBS)
35 @ echo -n Linking NSM Proxy...
36 @ $(CXX) $(CXXFLAGS) $(FLTK_LDFLAGS) $^ -o $@ $(XPM_LIBS) $(LIBLO_LIBS) $(FLTK_LIBS) -LFL -lfl_widgets && echo $(DONE)
38 src/send_osc: src/send_osc.o nonlib/libnonlib.a
39 @ $(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS) -Lnonlib -lnonlib && echo $(DONE)
41 src/jackpatch: src/jackpatch.o
42 @ $(CXX) $(CXXFLAGS) $^ -o $@ $(JACK_LIBS) $(LIBLO_LIBS) && echo $(DONE)
45 Session: src/send_osc src/nsmd src/session-manager src/jackpatch src/nsm-proxy src/nsm-proxy-gui
48 rm -f $(OBJS) src/nsmd src/session-manager src/jackpatch src/nsm-proxy src/nsm-proxy-gui .deps
51 @ echo -n "Installing..."
52 @ install -Dm755 src/nsmd "$(DESTDIR)$(prefix)"/bin/nsmd
53 @ install -Dm755 src/session-manager "$(DESTDIR)$(prefix)"/bin/non-session-manager
54 @ install -Dm755 src/nsm-proxy "$(DESTDIR)$(prefix)"/bin/nsm-proxy
55 @ install -Dm755 src/nsm-proxy-gui "$(DESTDIR)$(prefix)"/bin/nsm-proxy-gui
56 @ install -Dm755 src/jackpatch "$(DESTDIR)$(prefix)"/bin/jackpatch
57 @ install -d "$(DESTDIR)$(SYSTEM_PATH)"/non-session-manager
58 @ $(MAKE) -s -C doc install
59 @ install -d "$(DESTDIR)$(PIXMAP_PATH)/non-session-manager"
60 @ install -m 644 icons/hicolor/256x256/apps/non-session-manager.png "$(DESTDIR)$(PIXMAP_PATH)"/non-session-manager/icon-256x256.png
61 @ install -d "$(DESTDIR)$(ICON_PATH)/hicolor"
62 @ cp -au icons/hicolor/ "$(DESTDIR)$(ICON_PATH)"
63 @ install -d "$(DESTDIR)$(DESKTOP_PATH)"
64 @ sed 's:@BIN_PATH@:$(prefix)/bin:' non-session-manager.desktop.in > "$(DESTDIR)$(DESKTOP_PATH)/non-session-manager.desktop"
66 ifneq ($(USE_DEBUG),yes)
67 @ echo -n "Stripping..."
68 @ strip "$(DESTDIR)$(prefix)"/bin/jackpatch
69 @ strip "$(DESTDIR)$(prefix)"/bin/nsmd
70 @ strip "$(DESTDIR)$(prefix)"/bin/non-session-manager