File tree Expand file tree Collapse file tree 4 files changed +42
-0
lines changed
Expand file tree Collapse file tree 4 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ SUBDIRS = example
2+
3+ .PHONY : subdirs $(SUBDIRS )
4+
5+ subdirs : $(SUBDIRS )
6+
7+ $(SUBDIRS ) :
8+ $(MAKE ) -C $@
9+
10+ CLEANDIRS = $(SUBDIRS:%=clean-% )
11+
12+ clean : $(CLEANDIRS )
13+ $(CLEANDIRS ) :
14+ $(MAKE ) -C $(@:clean-%=% ) clean
15+
16+ .PHONY : subdirs $(INSTALLDIRS )
17+ .PHONY : clean
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ CXX = g++
1010LINK = ld
1111endif
1212
13+ RM = rm
1314CFLAGS = -Wall -g
1415LDFLAGS =
1516
@@ -23,3 +24,6 @@ DllLoader.exe: $(OBJ)
2324
2425% .o : % .cc
2526 $(CC ) $(CFLAGS ) -c $<
27+
28+ clean :
29+ $(RM ) -rf $(OBJ ) DllLoader.exe
Original file line number Diff line number Diff line change 1+ SUBDIRS = DllLoader SampleDLL
2+
3+ .PHONY : subdirs $(SUBDIRS )
4+
5+ subdirs : $(SUBDIRS )
6+
7+ $(SUBDIRS ) :
8+ $(MAKE ) -C $@
9+
10+ CLEANDIRS = $(SUBDIRS:%=clean-% )
11+
12+ clean : $(CLEANDIRS )
13+ $(CLEANDIRS ) :
14+ $(MAKE ) -C $(@:clean-%=% ) clean
15+
16+ .PHONY : subdirs $(INSTALLDIRS )
17+ .PHONY : clean
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ CXX = g++
1010LINK = ld
1111endif
1212
13+ RM = rm
1314CFLAGS = -Wall -g -DSAMPLEDLL_EXPORTS
1415LDFLAGS = -shared
1516
@@ -20,3 +21,6 @@ SampleDLL.dll: $(OBJ)
2021
2122% .o : % .cpp
2223 $(CXX ) $(CFLAGS ) -c $<
24+
25+ clean :
26+ $(RM ) -rf $(OBJ ) SampleDLL.dll
You can’t perform that action at this time.
0 commit comments