Commit 1715b4f8 authored by Aro's avatar Aro

Aro Ghukasyan Exercise 2.17 Version 1

parent 13b0d717
#include <iostream>
int
main()
{
std::cout << "1 2 3 4\n" ; ///version a
std::cout << "1 " << "2 " << "3 " << "4 " <<std::endl; ///version b
std::cout << "1 "; ///version c
std::cout << "2 ";
std::cout << "3 ";
std::cout << "4\n";
return 0;
}
progname=exercise_02_17
CFLAGS=-Wall -g
$(CXX)=g++
.SECONDARY:
.SUFFIXES:
$(progname): exercise_02_17.o
@echo "Linking..."
@$(CXX) $^ -o $@
%.o: %.s
@echo "Compiling $< ..."
@$(CXX) $(CFLAGS) -c $< -o $@
%.s: %.ii
@echo "Assembling $< ..."
@$(CXX) -S $< -o $@
%.ii: %.cpp
@echo "Pre-processing $< ..."
@$(CXX) -E $< -o $@
@echo exercise_02_17 > .gitignore
clear:
@echo "Cleaning ..."
@rm $(progname) *.o *.s *.ii .gitignore .makefile.swo .makefile.swp
test:
@./$(progname)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment