summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-06-13 04:22:58 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-06-16 21:09:18 +0300
commite4c2762680e1f5813f332a4ca22b0a7bf4ff4a9b (patch)
treeea6864be62343c2adfad976c4339267e728af749 /src/Makefile
parent62f0b16f639a9ecb116a79819655bdf44e269443 (diff)
Add gen-image tool
The tool is used to generate test images in a variety of formats from a PNM input image. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..564ee24
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,22 @@
+CROSS_COMPILE ?=
+
+CC := $(CROSS_COMPILE)gcc
+CFLAGS ?= -O0 -g -W -Wall -Wno-unused-parameter -Iinclude
+LDFLAGS ?=
+LIBS := -lm
+GEN-IMAGE := gen-image
+
+%.o : %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+all: $(GEN-IMAGE)
+
+$(GEN-IMAGE): gen-image.o
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+clean:
+ -rm -f *.o
+ -rm -f $(GEN-IMAGE)
+
+install:
+ cp $(GEN-IMAGE) $(INSTALL_DIR)/