Commit 955b9617 authored by Robert Ricci's avatar Robert Ricci

Behold the power of GNU make - a greatly simplified makefile.

It's not perfect - it doesn't rebuild the dependancy file at the
right time, but it should be good enough for our purposes.
parent 3327ba01
SRCS=$(wildcard *.cc)
OBJS=$(SRCS:.cc=.o)
HDRS=$(wildcard *.h)
DEPFILE=.depends
CXXFLAGS=-I. -Wall -g
LDFLAGS=-lm -lpcap
# Turn this on for profiling
#CXXFLAGS+=-pg
all: $(DEPFILE) magent
magent: $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
$(DEPFILE): $(SRCS) $(HDRS)
$(CXX) -MM $(SRCS) > $(DEPFILE)
clean:
-rm magent $(OBJS) $(DEPFILE)
-include $(DEPFILE)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment