Skip to content

Commit

Permalink
making this thing a desktop application
Browse files Browse the repository at this point in the history
  • Loading branch information
dsheeler committed Aug 8, 2017
1 parent 0543ff4 commit b822c87
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
PROGS = v4l2_wayland
PREFIX=/usr
APPDIR=$(PREFIX)/share/applications
BINDIR=$(PREFIX)/bin
PROGNAME=v4l2_wayland
DESKTOP_FILENAME=$(PROGNAME).desktop
PROGS=$(PROGNAME)

all: $(PROGS)

Expand All @@ -11,7 +16,8 @@ LFLAGS = $(shell pkg-config --libs wayland-client) \
-lccv -lm -lpng -ljpeg -lswscale -lavutil -lswresample \
-lavformat -lavcodec -lpthread -ljack
LIBS =
CFLAGS = -Wall -g $(shell pkg-config --cflags pangocairo) \
CFLAGS = -O3 -ffast-math -Wall \
$(shell pkg-config --cflags pangocairo) \
$(shell pkg-config --cflags gtk+-3.0) \
$(shell pkg-config --cflags fftw3)
SRCS = v4l2_wayland.c muxing.c sound_shape.c midi.c kmeter.c
Expand All @@ -28,5 +34,13 @@ HDRS = muxing.h sound_shape.h midi.h v4l2_wayland.h kmeter.h
v4l2_wayland: v4l2_wayland.c ${OBJS}
${CC} -o $@ ${OBJS} ${LFLAGS}

install: all
install $(PROGNAME) $(BINDIR)
install -m 644 $(DESKTOP_FILENAME) $(APPDIR)

uninstall:
rm -f $(BINDIR)/$(PROGNAME)
rm -f $(APPDIR)/$(DESKTOP_FILENAME)

clean:
rm -f ${OBJS} $(PROGS) $(PROGS:%=%.o)
8 changes: 8 additions & 0 deletions v4l2_wayland.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=V4L2 Wayland
Comment=A computer vision musical instrument
Exec=v4l2_wayland
Icon=v4l2_wayland.png
Terminal=false

0 comments on commit b822c87

Please sign in to comment.