Lazy Way of making a Simple C++ Project

---
action: Back ่ฟ”ๅ›ž
date: Apr 17, 2017
category: Dev Notes
tags:
- C++
- Makefile
---

Sometimes, when I try to do a lab project, I have to copy the makefile from each previous project to make my life easier and more lazy. However, I think I should be more lazy-so what I do is modified my Makefile a little bit, so that it can be easier, that I donโ€™t really need to modify the code any more, I just need to copy makefile and build my project ๐Ÿ˜‰

Here is the code for my makefile, it is actually pretty simple:

1
2
3
4
5
6
7
TARGET=$(shell basename $(PWD))
create:
g++ -g -o $(TARGET) *.cpp *.h

clean:
/bin/rm -f $(TARGET)
clear

Navigation

Not the Footnote

The site is proudly powered by Hexo and using a site strcuture from the Hexo theme called Nayo.

The site is powered by the glorious CSS from bettermotherf**kingwebsite.com with some tweaks. Censored the f-word for good.

Possibly the Footnote

Main | Access | RSS | Sitemap
2008 - 2020 | Patrick WU Jinming