diff options
Diffstat (limited to 'util_ack/Makefile')
-rw-r--r-- | util_ack/Makefile | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/util_ack/Makefile b/util_ack/Makefile new file mode 100644 index 0000000..4990099 --- /dev/null +++ b/util_ack/Makefile @@ -0,0 +1,33 @@ +### Application-specific constants + +APP_NAME := util_ack + +### Constant symbols + +CC := $(CROSS_COMPILE)gcc +AR := $(CROSS_COMPILE)ar + +CFLAGS := -O2 -Wall -Wextra -std=c99 -Iinc -I. + +OBJDIR = obj + +### General build targets + +all: $(APP_NAME) + +clean: + rm -f $(OBJDIR)/*.o + rm -f $(APP_NAME) + +### Main program compilation and assembly + +$(OBJDIR): + mkdir -p $(OBJDIR) + +$(OBJDIR)/%.o: src/%.c | $(OBJDIR) + $(CC) -c $(CFLAGS) $< -o $@ + +$(APP_NAME): $(OBJDIR)/$(APP_NAME).o + $(CC) $< -o $@ + +### EOF
\ No newline at end of file |