diff options
| author | 2026-07-08 01:37:28 -0500 | |
|---|---|---|
| committer | 2026-07-08 01:37:28 -0500 | |
| commit | 766dee7f4292f82be19265544a59e1282e29e208 (patch) | |
| tree | 650ed821b698cc7d5ad07ed51d5630334d4dd329 /linux/Makefile | |
| parent | begin work on pc side (diff) | |
Diffstat (limited to 'linux/Makefile')
| -rw-r--r-- | linux/Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/linux/Makefile b/linux/Makefile new file mode 100644 index 0000000..45123bf --- /dev/null +++ b/linux/Makefile @@ -0,0 +1,27 @@ +CC := gcc + +CFLAGS := -Wall -Wextra -Wpedantic -O0 -g -fsanitize=address +LDFLAGS := -O0 -g -fsanitize=address + +BUILDDIR := build +SOURCES := main.c util.c +OBJS := $(SOURCES:%=$(BUILDDIR)/%.o) +IMGNAME := exitest + +.PHONY: all +all: $(BUILDDIR)/$(IMGNAME) + +$(BUILDDIR)/$(IMGNAME): $(OBJS) + $(CC) $(OBJS) -o $@ $(LDFLAGS) + +$(BUILDDIR)/%.c.o: %.c + $(CC) -c $(CFLAGS) $< -o $@ + +$(OBJS): | $(BUILDDIR) + +$(BUILDDIR): + mkdir $(BUILDDIR) + +.PHONY: clean +clean: + -rm -rvf $(BUILDDIR) |
