Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Compiler variable:
- CC=g++
- # Compiler flags/options variable:
- CFLAGS=-c -Wall
- # Linker flags/options variable:
- LDFLAGS=-s
- # Source files variable:
- SOURCES=main.cpp hello.cpp functions.cpp
- # Object files variable:
- OBJECTS=$(SOURCES:.cpp=.o)
- # Executable variable:
- EXECUTABLE=hello
- all: $(SOURCES) $(EXECUTABLE)
- $(EXECUTABLE): $(OBJECTS)
- $(CC) $(LDFLAGS) $(OBJECTS) -o $@
- .cpp.o:
- $(CC) $(CFLAGS) $< -o $@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement