languages

A collection of programs made with different programming languages.
git clone git://evanalba.com/languages
Log | Files | Refs

makefile (1583B)


      1 # Makefile for Assignment 3
      2 CXX = g++
      3 ASSIGNMENT = 3
      4 ASSIGNMENT_NAME = assignment_${ASSIGNMENT}
      5 MAIN = ${ASSIGNMENT_NAME}_unit_test
      6 CPP_FILES = todo_item.cpp todo_list.cpp todo_ui.cpp
      7 H_FILES = todo_item.h todo_list.h todo_ui.h
      8 CXXFLAGS = -Wall -Wextra -pedantic -g
      9 
     10 options:
     11 	@echo
     12 	@echo Options
     13 	@echo ----------------------------------------
     14 	@echo 'make              - View these options'
     15 	@echo 'make todo_list    - Compiles the unit test for TodoList'
     16 	@echo 'make todo_ui      - Compiles the UI Application'
     17 	@echo 'make style        - Runs the class style check'
     18 	@echo 'make clean        - Deletes your executable'
     19 	@echo
     20 	@echo
     21 	@echo "Once you've created your executable use the following to test"
     22 	@echo './${ASSIGNMENT_NAME}     - Run the Interactive Unit Test'
     23 	@echo
     24 	@echo
     25 
     26 # Type 'make todo_ui' to create the executable
     27 todo_ui: driver.cpp ${H_FILES} CinReader.h ${CPP_FILES} CinReader.cpp
     28 	${CXX} ${CXXFLAGS} driver.cpp ${CPP_FILES} CinReader.cpp -o ${ASSIGNMENT_NAME}
     29 	@echo
     30 	@echo 'Compiled! (Fix any warnings above)'
     31 
     32 todo_list: ${MAIN}.cpp todo_list.h todo_list.cpp todo_item.h todo_item.cpp
     33 	${CXX} ${CXXFLAGS} ${MAIN}.cpp todo_list.cpp todo_item.cpp -o ${ASSIGNMENT_NAME}
     34 	@echo
     35 	@echo 'Compiled! (Fix any warnings above)'
     36 
     37 # Type 'make style' to check your code style
     38 s style: ../../helpful_files/cpplint.py
     39 	python2 $< --filter=-runtime/references,-legal/copyright,-readability/streams,-runtime/explicit,-build/header_guard,-build/include ${H_FILES} ${CPP_FILES} driver.cpp
     40 
     41 # Type 'make clean' to remove the executable
     42 c clean:
     43 	rm -rf ${ASSIGNMENT_NAME}