Skip to content

Instantly share code, notes, and snippets.

@adabo
Created February 23, 2019 22:51
Show Gist options
  • Save adabo/1a5658f8187042931d83eec4e356bc28 to your computer and use it in GitHub Desktop.
Save adabo/1a5658f8187042931d83eec4e356bc28 to your computer and use it in GitHub Desktop.
CC=gcc
#CXX=g++
CXX=$(shell root-config --cxx)
RM=rm -f
#CPPFLAGS=-g $(shell root-config --cflags)
CPPFLAGS=$(shell root-config --cflags)
LDFLAGS=-g $(shell root-config --ldflags)
LDLIBS=$(shell root-config --libs)
SRCS=main.cpp item.cpp item.h backpack.cpp backpack.h constants.h
OBJS=$(subst .cc,.o,$(SRCS))
all: main
main: $(OBJS)
$(CXX) $(LDFLAGS) -o main $(OBJS) $(LDLIBS)
depend: .depend
.depend: $(SRCS)
$(RM) ./.depend
$(CXX) $(CPPFLAGS) -MM $^>>./.depend;
clean:
$(RM) $(OBJS)
distclean: clean
$(RM) *~ .depend
include .depend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment