Created
April 12, 2011 20:49
-
-
Save lxfontes/916372 to your computer and use it in GitHub Desktop.
c++ sample makefile
This file contains 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++ | |
CFLAGS = -Wall -O2 | |
LDFLAGS = -lpcap | |
OBJFILES := $(patsubst %.cc,%.o,$(wildcard *.cc)) | |
PROG=pcapr | |
COMPILE = $(CC) $(CFLAGS) -c | |
all: $(PROG) | |
$(PROG): $(OBJFILES) | |
$(CC) -o $(PROG) $(OBJFILES) $(LDFLAGS) | |
%.o: %.cc | |
$(COMPILE) -o $@ $< |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment