added generic makefile for c/cpp. should be updated for various headers hh, hpp, and src (.cpp)
This commit is contained in:
parent
d6f1cd2c81
commit
f3266bd6bb
|
@ -0,0 +1,25 @@
|
||||||
|
# var. C/C++
|
||||||
|
CC = gcc
|
||||||
|
#CC = g++
|
||||||
|
CFLAGS = -Wall -std=c11 -g
|
||||||
|
#CFLAGS = -Wall -O0 -g -std=c++1y -Werror=uninitialized -Werror=conversion
|
||||||
|
RM = /bin/rm
|
||||||
|
|
||||||
|
# src, .o, .out
|
||||||
|
SRC = ${wildcard *.c}
|
||||||
|
HEAD = ${SRC:.c=.h}
|
||||||
|
OBJ = ${SRC:.c=.o}
|
||||||
|
ELF = ${SRC:.c=.out}
|
||||||
|
|
||||||
|
# target
|
||||||
|
${ELF}: ${OBJ}
|
||||||
|
${CC} ${OBJ} -o ${ELF}
|
||||||
|
|
||||||
|
# object
|
||||||
|
%.o: %.c
|
||||||
|
${CC} -c ${CFLAGS} $< -o $@
|
||||||
|
|
||||||
|
# cleanall
|
||||||
|
clean:
|
||||||
|
${RM} -f ${ELF} ${OBJ}
|
||||||
|
|
Loading…
Reference in New Issue