Skip to content

Commit ecfd95f

Browse files
committed
toplevel makefile now only handles cmake build. renamed old Makefile
1 parent 9682a41 commit ecfd95f

File tree

2 files changed

+39
-29
lines changed

2 files changed

+39
-29
lines changed

Makefile

+1-29
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,9 @@
1-
ITSLIB=$(HOME)/myprj/itslib
2-
all: vdwreader
3-
41
cmake:
52
cmake -B build . $(if $(D),-DCMAKE_BUILD_TYPE=Debug,-DCMAKE_BUILD_TYPE=Release) $(CMAKEARGS)
63
$(MAKE) -C build $(if $(V),VERBOSE=1)
74

5+
86
clean:
9-
$(RM) -r $(wildcard *.o) *.dSYM vdwreader
107
$(RM) -r build CMakeFiles CMakeCache.txt CMakeOutput.log
118

12-
vdwreader: vdwreader.o stringutils.o
13-
14-
CFLAGS=-g -Wall $(if $(D),-O0,-O3)
15-
CFLAGS+=-I $(ITSLIB)/include/itslib
16-
CFLAGS+=-D_UNIX -D_NO_RAPI
17-
CFLAGS+=-I /usr/local/opt/openssl/include
18-
CFLAGS+=-I .
19-
20-
CXXFLAGS=-std=c++17
21-
22-
# include CDEFS from make commandline
23-
CFLAGS+=$(CDEFS)
24-
25-
LDFLAGS+=-g -Wall -L/usr/local/opt/openssl/lib -lcrypto -lz
26-
27-
vpath .cpp $(ITSLIB)/src .
28-
29-
%.o: $(ITSLIB)/src/%.cpp
30-
$(CXX) -c $(CFLAGS) $(CXXFLAGS) $^ -o $@
31-
32-
%.o: %.cpp
33-
$(CXX) -c $(CFLAGS) $(CXXFLAGS) $(filter %.cpp,$^) -o $@
34-
35-
%: %.o
36-
$(CXX) $(LDFLAGS) $^ -o $@
379

Makefile.linux

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
ITSLIB=$(HOME)/myprj/itslib
2+
3+
cmake:
4+
cmake -B build . $(if $(D),-DCMAKE_BUILD_TYPE=Debug,-DCMAKE_BUILD_TYPE=Release) $(CMAKEARGS)
5+
$(MAKE) -C build $(if $(V),VERBOSE=1)
6+
7+
all: vdwreader
8+
9+
clean:
10+
$(RM) -r $(wildcard *.o) *.dSYM vdwreader
11+
$(RM) -r build CMakeFiles CMakeCache.txt CMakeOutput.log
12+
13+
vdwreader: vdwreader.o stringutils.o
14+
15+
CFLAGS=-g -Wall $(if $(D),-O0,-O3)
16+
CFLAGS+=-I $(ITSLIB)/include/itslib
17+
CFLAGS+=-D_UNIX -D_NO_RAPI
18+
CFLAGS+=-I /usr/local/opt/openssl/include
19+
CFLAGS+=-I .
20+
21+
CXXFLAGS=-std=c++17
22+
23+
# include CDEFS from make commandline
24+
CFLAGS+=$(CDEFS)
25+
26+
LDFLAGS+=-g -Wall -L/usr/local/opt/openssl/lib -lcrypto -lz
27+
28+
vpath .cpp $(ITSLIB)/src .
29+
30+
%.o: $(ITSLIB)/src/%.cpp
31+
$(CXX) -c $(CFLAGS) $(CXXFLAGS) $^ -o $@
32+
33+
%.o: %.cpp
34+
$(CXX) -c $(CFLAGS) $(CXXFLAGS) $(filter %.cpp,$^) -o $@
35+
36+
%: %.o
37+
$(CXX) $(LDFLAGS) $^ -o $@
38+

0 commit comments

Comments
 (0)