New presentation and organization
This commit is contained in:
parent
018bae577a
commit
9731ba9a7a
24 changed files with 73 additions and 189 deletions
34
Makefile
Normal file
34
Makefile
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
CC = gcc
|
||||
CFLAGS = -std=c99 -pedantic -Werror -Wall -Wextra -Wvla
|
||||
LDFLAGS=
|
||||
|
||||
DBG_CFLAGS = -fsanitize=address -g
|
||||
DBG_LDFLAGS= -fsanitize=address
|
||||
|
||||
|
||||
SRC_DIR = src
|
||||
LIB_SRCS = lines/lines.c hash_maps/hash_maps.c lists/lists.c files/files.c
|
||||
MAIN_SRCS = main.c minimake.c
|
||||
|
||||
# SRCS = $(patsubst %,$(SRC_DIR)/%, $(MAIN_SRCS))
|
||||
SRCS = $(MAIN_SRCS:%=$(SRC_DIR)/%) $(LIB_SRCS:%=$(SRC_DIR)/%)
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
TARGET= minimake
|
||||
# DBG_TARGET = minimake-dbg
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)
|
||||
@echo $(OBJS)
|
||||
|
||||
debug: CFLAGS += $(DBG_CFLAGS)
|
||||
debug: LDFLAGS += $(DBG_LDFLAGS)
|
||||
debug: $(OBJS)
|
||||
$(CC) -o $(TARGET) $^ $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
check:
|
||||
dash ./tests/run.sh
|
||||
|
||||
clean:
|
||||
$(RM) $(TARGET)
|
||||
$(RM) $(OBJS)
|
||||
Loading…
Add table
Add a link
Reference in a new issue