updated Makefile to new directory structure
This commit is contained in:
parent
07a690762e
commit
d06274dab6
1 changed files with 7 additions and 5 deletions
12
Makefile
12
Makefile
|
@ -1,12 +1,14 @@
|
|||
SRCS = $(wildcard *.c)
|
||||
PROGS = $(patsubst %.c,%,$(SRCS))
|
||||
SRCS = $(wildcard src/*.c)
|
||||
PROGS = $(patsubst src/%.c,%,$(SRCS))
|
||||
|
||||
CFLAGS += -g -Wall -O0
|
||||
VPATH = src/
|
||||
|
||||
all: $(PROGS)
|
||||
|
||||
%: %.c
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
%: src/%.c
|
||||
$(CC) $(CFLAGS) $< -o bin/$@
|
||||
|
||||
clean:
|
||||
rm -f *.o *.save $(PROGS)
|
||||
rm -f bin/* src/*.save
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue