Lazy Way of making a Simple C++ Project

---
date: Apr 17, 2017
tags:
-
-
---

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.

This site is hosted on Digital Ocean. Deploy your next app in seconds. Get $100 in cloud credits from @DigitalOcean using my link.

Custom Stickers, Die Cut Stickers, Bumper Stickers - Sticker Mule

Possibly the Footnote

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