summaryrefslogtreecommitdiffstats
path: root/package/gpioctl/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'package/gpioctl/src/Makefile')
-rw-r--r--package/gpioctl/src/Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/package/gpioctl/src/Makefile b/package/gpioctl/src/Makefile
new file mode 100644
index 000000000..467697410
--- /dev/null
+++ b/package/gpioctl/src/Makefile
@@ -0,0 +1,24 @@
+PROGS = gpioctl
+
+INSTDIR = $(prefix)/usr/bin
+INSTMODE = 0755
+INSTOWNER = root
+INSTGROUP = root
+
+OBJS = main.o
+
+all: $(PROGS)
+$(PROGS): $(OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
+ $(STRIP) $@
+
+%.o: %.c
+ $(CC) -c $(CFLAGS) $^ -o $@
+
+install: $(PROGS)
+ $(INSTALL) -d $(INSTDIR)
+ $(INSTALL) -m $(INSTMODE) -o $(INSTOWNER) -g $(INSTGROUP) $(PROGS) $(INSTDIR)
+
+clean:
+ rm -f $(PROGS) *.o core
+