uni

University stuff
git clone git://git.christosmarg.xyz/uni-assignments.git
Log | Files | Refs | README | LICENSE

Makefile (626B)


      1 # compiler
      2 CC = c++
      3 
      4 # includes and libs
      5 INCS = -Iinclude 
      6 LIBS = -Llib -lncursesw -lm
      7 
      8 # flags
      9 CFLAGS = -std=c++14 -pedantic -Wall -Os ${INCS}
     10 LDFLAGS = ${LIBS}
     11 
     12 BIN = game
     13 
     14 SRC = main.cc \
     15       Engine.cc \
     16       Gnome.cc \
     17       Movable.cc \
     18       Potter.cc \
     19       Score.cc \
     20       Traal.cc \
     21 
     22 OBJ = ${SRC:.cc=.o}
     23 
     24 all: options ${BIN}
     25 
     26 options:
     27 	@echo ${BIN} build options:
     28 	@echo "CFLAGS   = ${CFLAGS}"
     29 	@echo "LDFLAGS  = ${LDFLAGS}"
     30 	@echo "CC       = ${CC}"
     31 
     32 ${BIN}: ${OBJ}
     33 	${CC} ${LDFLAGS} ${OBJ} -o $@
     34 
     35 .cc.o:
     36 	${CC} -c ${CFLAGS} $<
     37 
     38 run:
     39 	./${BIN}
     40 
     41 clean:
     42 	rm -f ${BIN} ${OBJ} *.core
     43 
     44 .PHONY: all options clean run