spigotcpp/Makefile

32 lines
440 B
Makefile

CC=gcc
CXX=g++
RM=rm -f
CPPFLAGS=-Wall
LDFLAGS=
LDLIBS=-lm
SRCS=main.cpp Spigot.cpp
OBJS=$(subst .cpp,.o,$(SRCS))
all: main
debug: $(OBJS)
$(CXX) $(LDFLAGS) -ggdb -O0 -o main $(OBJS) $(LDLIBS)
main: $(OBJS)
$(CXX) $(LDFLAGS) -O3 -o main $(OBJS) $(LDLIBS)
depend: .depend
.depend: $(SRCS)
$(RM) ./.depend
$(CXX) $(CPPFLAGS) -MM $^ >> ./.depend
clean:
$(RM) $(OBJS)
$(RM) main
distclean: clean
$(RM) *~ .depend
include .depend