new repo
This commit is contained in:
35
Makefile
Normal file
35
Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
CC=gcc
|
||||
CXX=g++
|
||||
RM=rm -f
|
||||
CP=cp
|
||||
MKDIR=mkdir -p
|
||||
CPPFLAGS=-Wall -O2 -std=c++11
|
||||
LDFLAGS=
|
||||
LDLIBS=
|
||||
|
||||
TOOL=ranlin
|
||||
SRCS=main.cpp
|
||||
OBJS=$(subst .cpp,.o,$(SRCS))
|
||||
|
||||
all: $(TOOL)
|
||||
|
||||
$(TOOL): $(OBJS)
|
||||
$(CXX) $(LDFLAGS) -o $(TOOL) $(LDLIBS) $(OBJS)
|
||||
|
||||
depend: .depend
|
||||
|
||||
.depend: $(SRCS)
|
||||
$(RM) ./.depend
|
||||
$(CXX) $(CPPFLAGS) -MM $^>>./.depend;
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJS)
|
||||
|
||||
dist-clean: clean
|
||||
$(RM) *~ ./.depend $(TOOL)
|
||||
|
||||
install:
|
||||
$(RM) ~/bin/$(TOOL)
|
||||
$(CP) $(TOOL) ~/bin/
|
||||
|
||||
include .depend
|
Reference in New Issue
Block a user