Added/updated makefiles to build all sample files using one "make".

This commit is contained in:
Joachim Bauch
2013-03-05 01:09:49 +01:00
parent 257a77c0e9
commit c23d0642d6
4 changed files with 42 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
SUBDIRS = example
.PHONY: subdirs $(SUBDIRS)
subdirs: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@
CLEANDIRS = $(SUBDIRS:%=clean-%)
clean: $(CLEANDIRS)
$(CLEANDIRS):
$(MAKE) -C $(@:clean-%=%) clean
.PHONY: subdirs $(INSTALLDIRS)
.PHONY: clean
+4
View File
@@ -10,6 +10,7 @@ CXX = g++
LINK = ld
endif
RM = rm
CFLAGS = -Wall -g
LDFLAGS =
@@ -23,3 +24,6 @@ DllLoader.exe: $(OBJ)
%.o: %.cc
$(CC) $(CFLAGS) -c $<
clean:
$(RM) -rf $(OBJ) DllLoader.exe
+17
View File
@@ -0,0 +1,17 @@
SUBDIRS = DllLoader SampleDLL
.PHONY: subdirs $(SUBDIRS)
subdirs: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@
CLEANDIRS = $(SUBDIRS:%=clean-%)
clean: $(CLEANDIRS)
$(CLEANDIRS):
$(MAKE) -C $(@:clean-%=%) clean
.PHONY: subdirs $(INSTALLDIRS)
.PHONY: clean
+4
View File
@@ -10,6 +10,7 @@ CXX = g++
LINK = ld
endif
RM = rm
CFLAGS = -Wall -g -DSAMPLEDLL_EXPORTS
LDFLAGS = -shared
@@ -20,3 +21,6 @@ SampleDLL.dll: $(OBJ)
%.o: %.cpp
$(CXX) $(CFLAGS) -c $<
clean:
$(RM) -rf $(OBJ) SampleDLL.dll