init commit ; code done
This commit is contained in:
commit
06aabe1dbf
4 changed files with 332 additions and 0 deletions
23
Makefile
Normal file
23
Makefile
Normal file
|
@ -0,0 +1,23 @@
|
|||
SRC = src/main.c
|
||||
OJB = $(SRC:.c=.o)
|
||||
OUT = build
|
||||
|
||||
CC = /usr/bin/gcc
|
||||
CFLAGS = -ansi -Wall -std=c99
|
||||
CFDEBUG = -ansi -Wall -fsanitize=address -g -std=c99
|
||||
RM = /bin/rm -f $(OUT)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c $(CFLAGS)
|
||||
|
||||
build:
|
||||
$(CC) $(SRC) $(CFLAGS) -o $(OUT)/main.o
|
||||
|
||||
debug:
|
||||
$(CC) $(SRC) $(CFDEBUG) -o $(OUT)/main.o
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJ) $(OUT)/main.o
|
||||
|
||||
run: $(SRC)
|
||||
$(CC) $(SRC) $(CFLAGS) -o $(OUT)/main.o && ./build/main.o
|
Loading…
Add table
Add a link
Reference in a new issue