diff options
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 22 |
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)/ |