Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #MY NEW MAKEFILE
- #YOU CAN ADD MUCH MORE THINGS
- #THE "extra" IS ANOTHER FOLDER IN THE SAME PLACE HAS THIS MAKEFILE
- BUILD_FILE = hello
- CFLAGS=-c -Wall
- LDFLAGS=
- MAIN_OBJ = *.o
- MAIN_CPP = *.cpp
- EXTRA_OBJ = extra/*.o
- EXTRA_CPP = extra/*.cpp
- all: $(BUILD_FILE)
- $(BUILD_FILE): $(MAIN_OBJ) $(EXTRA_OBJ)
- g++ $(LDFLAGS) *.o -o $(BUILD_FILE)
- $(MAIN_OBJ): $(MAIN_CPP)
- g++ $(CFLAGS) $(MAIN_CPP)
- $(EXTRA_OBJ): $(EXTRA_CPP)
- g++ $(CFLAGS) $(EXTRA_CPP)
- clean:
- rm -rf *o $(BUILD_FILE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement