Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102724992
makefile
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Feb 23, 13:23
Size
537 B
Mime Type
text/x-makefile
Expires
Tue, Feb 25, 13:23 (2 d)
Engine
blob
Format
Raw Data
Handle
24405438
Attached To
R5521 PH_week6_assign
makefile
View Options
NAME := cloture
BIN := bin/$(NAME)
CC := g++
INCLUDES := -I include
CPP11 := -std=c++11
# other required libraries
LIBS := #add libraries
CSOURCES := $(wildcard src/*.cpp)
OBJECTS := $(patsubst src/%.cpp,bin/%.o,$(CSOURCES))
.PHONY: dirs clean install
all: $(BIN)
$(BIN): $(OBJECTS) dirs
$(CC) -o $@ $(CPP11) $(OBJECTS) $(INCLUDES) $(LIBS)
$(OBJECTS): bin/%.o : src/%.cpp $(CSOURCES) dirs
@printf "\n"
$(CC) -c $< $(CPP11) -o $@ $(INCLUDES)
install:
sudo cp -i bin/$(NAME) /usr/bin
dirs:
mkdir -p bin
clean:
rm -rd bin/*
Event Timeline
Log In to Comment