Created
July 24, 2015 01:21
-
-
Save elvinio/72b252afeb636bbfb70f to your computer and use it in GitHub Desktop.
An example makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC = g++ -c -g -Wall -I . | |
LINKER = g++ | |
PLATFORMLINK = -lstdc++ -lpthread -ldl -lssl | |
OBJFILES = ${patsubst %.cpp,%.o,${wildcard *.cpp)) | |
all:Program | |
%.o: $.cpp | |
$(CC) -o $@ $< | |
Program: $(OBJFILES) | |
$(LINKER) -o $@ $(OBJFILES) $(PLATFORMLINK) | |
clean: | |
rm -f *.o *~ Program core |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment