summaryrefslogtreecommitdiff
path: root/crc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'crc/Makefile')
-rw-r--r--crc/Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/crc/Makefile b/crc/Makefile
new file mode 100644
index 0000000..0922163
--- /dev/null
+++ b/crc/Makefile
@@ -0,0 +1,32 @@
+# SPDX-License-Identifier: CC0-1.0
+
+CROSS_COMPILE ?=
+
+CC := $(CROSS_COMPILE)gcc
+CFLAGS ?= -O2 -W -Wall -Wno-unused-parameter -Iinclude
+LDFLAGS ?=
+LIBS :=
+
+OUTPUT := discom-crc
+OBJECTS := main.o
+
+%.o : %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+all: $(OUTPUT)
+
+$(OUTPUT): $(OBJECTS)
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+crc.c : gen-crc.py
+ ./$< $@
+
+main.o : crc.c
+
+clean:
+ -rm -f *.o
+ -rm -f crc.c
+ -rm -f $(OUTPUT)
+
+install:
+ cp $(OUTPUT) $(INSTALL_DIR)/