basic makefile c 2b 2b

Solutions on MaxInterview for basic makefile c 2b 2b by the best coders in the world

showing results for - "basic makefile c 2b 2b"
Mattia
09 Jan 2018
1CC=gcc
2CXX=g++
3RM=rm -f
4CPPFLAGS=-g $(shell root-config --cflags)
5LDFLAGS=-g $(shell root-config --ldflags)
6LDLIBS=$(shell root-config --libs)
7
8SRCS=tool.cc support.cc
9OBJS=$(subst .cc,.o,$(SRCS))
10
11all: tool
12
13tool: $(OBJS)
14    $(CXX) $(LDFLAGS) -o tool $(OBJS) $(LDLIBS)
15
16tool.o: tool.cc support.hh
17
18support.o: support.hh support.cc
19
20clean:
21    $(RM) $(OBJS)
22
23distclean: clean
24    $(RM) tool
25
Isaure
15 Sep 2016
1CC=gcc
2CXX=g++
3RM=rm -f
4CPPFLAGS=-g $(shell root-config --cflags)
5LDFLAGS=-g $(shell root-config --ldflags)
6LDLIBS=$(shell root-config --libs)
7
8SRCS=tool.cc support.cc
9OBJS=$(subst .cc,.o,$(SRCS))
10
11all: tool
12
13tool: $(OBJS)
14    $(CXX) $(LDFLAGS) -o tool $(OBJS) $(LDLIBS)
15
16tool.o: tool.cc support.hh
17
18support.o: support.hh support.cc
19
20clean:
21    $(RM) $(OBJS)
22
23distclean: clean
24    $(RM) tool
25
Maximiliano
14 Apr 2016
1CC=gcc
2CXX=g++
3RM=rm -f
4CPPFLAGS=-g $(shell root-config --cflags)
5LDFLAGS=-g $(shell root-config --ldflags)
6LDLIBS=$(shell root-config --libs)
7
8SRCS=tool.cc support.cc
9OBJS=$(subst .cc,.o,$(SRCS))
10
11all: tool
12
13tool: $(OBJS)
14    $(CXX) $(LDFLAGS) -o tool $(OBJS) $(LDLIBS)
15
16tool.o: tool.cc support.hh
17
18support.o: support.hh support.cc
19
20clean:
21    $(RM) $(OBJS)
22
23distclean: clean
24    $(RM) tool