Makefile: be a little more conventional

The all target will build the programs, and each program has its
source as build dep.

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
master
Serge E. Hallyn 4 years ago committed by Miles Alan
parent 5a4ce877df
commit 41f2adf18a
  1. 16
      Makefile

@ -2,28 +2,32 @@ PREFIX:=/
.PHONY: install shellcheck
PROGRAMS = programs/sxmo_setpineled programs/sxmo_setpinebacklight programs/sxmo_screenlock programs/sxmo_megiaudioroute programs/sxmo_megiaudioroute
all: shellcheck $(PROGRAMS)
shellcheck:
shellcheck scripts/*/*
programs/sxmo_setpineled:
programs/sxmo_setpineled: programs/sxmo_setpineled.c
gcc -o programs/sxmo_setpineled programs/sxmo_setpineled.c
programs/sxmo_setpinebacklight:
programs/sxmo_setpinebacklight: programs/sxmo_setpinebacklight.c
gcc -o programs/sxmo_setpinebacklight programs/sxmo_setpinebacklight.c
programs/sxmo_screenlock:
programs/sxmo_screenlock: programs/sxmo_screenlock.c
gcc -o programs/sxmo_screenlock programs/sxmo_screenlock.c -lX11
programs/sxmo_megiaudioroute:
programs/sxmo_megiaudioroute: programs/sxmo_megiaudioroute.c
gcc -o programs/sxmo_megiaudioroute programs/sxmo_megiaudioroute.c
programs/sxmo_vibratepine:
programs/sxmo_vibratepine: programs/sxmo_vibratepine.c
gcc -o programs/sxmo_vibratepine programs/sxmo_vibratepine.c
clean:
rm programs/sxmo_setpineled programs/sxmo_screenlock programs/sxmo_setpinebacklight programs/sxmo_megiaudioroute programs/sxmo_vibratepine
install: programs/sxmo_setpineled programs/sxmo_setpinebacklight programs/sxmo_screenlock programs/sxmo_megiaudioroute programs/sxmo_vibratepine
install: $(PROGRAMS)
mkdir -p $(PREFIX)/usr/share/sxmo
cp -r configs/* $(PREFIX)/usr/share/sxmo

Loading…
Cancel
Save