Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F111785236
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
Mon, May 5, 01:01
Size
504 B
Mime Type
text/x-makefile
Expires
Wed, May 7, 01:01 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25981914
Attached To
R4947 template c++
makefile
View Options
NAME := test
BIN := bin/$(NAME)
CC := g++
INCLUDES := -I include
# 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 $@ $(OBJECTS) $(INCLUDES) $(LIBS)
$(OBJECTS): bin/%.o : src/%.cpp $(CSOURCES) dirs
@printf "\n"
$(CC) -c $< -o $@ $(INCLUDES)
install:
sudo cp -i bin/$(NAME) /usr/bin
dirs:
mkdir -p bin include
clean:
rm -rd bin/*
Event Timeline
Log In to Comment