Created
December 13, 2014 09:38
-
-
Save rawlik/fdcde9507880ceb2f611 to your computer and use it in GitHub Desktop.
a simple ROOT 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
CC=clang++ | |
FLAGS= `root-config --cflags` -std=c++11 | |
LINK_FLAGS= `root-config --glibs` | |
DEPS = breedSFC.h | |
PROGRAMS = playground tests | |
PROGRAMS_OBJS = $(foreach X,$(PROGRAMS),$(X).o) | |
OBJS = breedSFC.o | |
all: $(PROGRAMS) | |
# compile object files | |
%.o: %.cpp $(DEPS) | |
$(CC) $(FLAGS) -c -o $@ $< | |
# link each program | |
# a program depends on program.o and other objects | |
$(PROGRAMS): %: %.o $(OBJS) | |
$(CC) $(LINK_FLAGS) -o $@ $^ | |
clean: | |
rm -f $(PROGRAMS) $(PROGRAMS_OBJS) $(OBJS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment