diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..36f971e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +bin/* diff --git a/Makefile b/Makefile index 0b427d1..630d2ae 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ SRC = $(wildcard src/*.c) DEPS = $(wildcard deps/**/*.c) OBJS = $(patsubst %.c,%.o,$(DEPS)) -BINS = $(notdir $(patsubst %.c,%,$(SRC))) +BINS = $(patsubst src/%,bin/%,$(patsubst %.c,%,$(SRC))) # CFLAGS = -std=c99 -Ideps -Wall -Wno-unused-function -U__STRICT_ANSI__ CFLAGS = -ggdb -std=c99 -Ideps -Wall -Wno-unused-function -pedantic @@ -12,7 +12,7 @@ all: $(BINS) echo "BINS=$(BINS)" $(BINS): $(SRC) $(OBJS) - $(CC) $(CFLAGS) -o $@ src/$@.c $(OBJS) $(LDFLAGS) + $(CC) $(CFLAGS) -o $@ src/$(notdir $@).c $(OBJS) $(LDFLAGS) %.o: %.c $(CC) $< -c -o $@ $(CFLAGS)