Created
June 23, 2011 05:29
-
-
Save shwangdev/1041959 to your computer and use it in GitHub Desktop.
Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C++ = g++ | |
ifndef os | |
os = LINUX | |
endif | |
SRC= $(shell ls *.cpp) | |
OBJS= $(SRC:%.cpp=%.o) | |
DIR = $(shell pwd) | |
Target=test | |
all: $(Target) | |
$(Target):$(OBJS) | |
$(C++) -o $@ $^ $(LDFLAGS) | |
%.o: %.cpp | |
$(C++) $(CCFLAGS) $< -c | |
clean: | |
rm -f *.o | |
rm -f $(Target) | |
install: | |
export PATH=$(DIR):$$PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment