-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
62 lines (40 loc) · 1.32 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Guide used while writing this makefile is
# https://stackoverflow.com/questions/68428103/how-to-create-a-makefile-for-a-c-project-with-multiple-directories
# https://stackoverflow.com/questions/18007326/how-to-change-default-values-of-variables-like-cc-in-makefile
ifeq ($(origin CC),default)
CC = gcc
endif
BLOBSTAMPER_SRC := $(wildcard blobstamper/*.cpp)
BLOBSTAMPER_OBJ := $(addsuffix .o, $(basename $(BLOBSTAMPER_SRC)))
EXAMPLES_SRC = $(wildcard examples/*.cpp)
EXAMPLES_BIN = $(basename $(EXAMPLES_SRC))
.PHONY: all blob-stamper-all blob-stamper-clean clean test gagaga
all: $(BLOBSTAMPER_OBJ)
@echo All done!
blobstamper/%.o: blobstamper/%.cpp
$(CXX) -c -g $(CXXFLAGS) $< -o $@
# blob-stamper-all:
# $(MAKE) -C blobstamper
#%.o: %.cpp $(DEPS)
# $(CXX) -c -g $(CFLAGS) $<
#%.o: %.c $(DEPS)
# $(CC) -c -g $(CXXFLAGS) $<
blob-stamper-clean:
rm -f *.o
clean: blob-stamper-clean
$(MAKE) -C blobstamper clean
$(MAKE) -C t clean
$(MAKE) -C examples clean
$(MAKE) -C libtappp clean
@echo Clean done!
test:
$(MAKE) -C t test
#test_dict: test_dict.o blob-stamper-all
# $(CXX) $(LDFLAGS) [email protected] -o $@ $(BLOB_STAMPER_OBJ)
examples: $(BLOBSTAMPER_OBJ)
$(MAKE) -C examples
gagaga:
@echo ------- $(BLOBSTAMPER_OBJ)
#all: blob-stamper-all test_dict $(WRAPPERS_OBJ)
#all: blob-stamper-all $(WRAPPERS_OBJ)
# @echo All done!