Aufgrund eines Versionsupdates wird GitLab am 01.04. zwischen 9:00 und 9:30 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to a version upgrade, GitLab won't be accessible at 01.04. between 9:00 and 9:30 a.m.

Commit c8a32dfd authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼

improved Makefiles in whole repo

parent f2c0ef6c
DIRS=$(shell find . -type f -name Makefile | xargs dirname | egrep -v '^\.$$')
SUBDIRS = basics kguebung chapters
.PHONY: all $(DIRS)
.PHONY: all test build $(SUBDIRS) $(addprefix test-,$(SUBDIRS)) $(addprefix clean-,$(SUBDIRS))
all: $(DIRS)
all: build
test:
make -C chapters/chapter2 test
make -C basics test
$(DIRS):
build: $(SUBDIRS)
test: $(addprefix test-,$(SUBDIRS))
clean: $(addprefix clean-,$(SUBDIRS))
$(SUBDIRS):
$(MAKE) -C $@
$(addprefix test-,$(SUBDIRS)): test-%: %
$(MAKE) -C $* test
$(addprefix clean-,$(SUBDIRS)): clean-%:
$(MAKE) -C $* clean
.PHONY: all depend clean test
SUBDIRS = c asm simple
all:
make -C c all
make -C asm all
make -C simple all
.PHONY: all test build $(SUBDIRS) $(addprefix test-,$(SUBDIRS)) $(addprefix clean-,$(SUBDIRS))
test:
make -C c test
make -C asm test
make -C simple test
clean:
make -C c clean
make -C asm clean
make -C simple clean
all: build
depend:
make -C c depend
make -C asm depend
make -C simple depend
build: $(SUBDIRS)
test: $(addprefix test-,$(SUBDIRS))
clean: $(addprefix clean-,$(SUBDIRS))
$(SUBDIRS):
$(MAKE) -C $@
$(addprefix test-,$(SUBDIRS)): test-%: %
$(MAKE) -C $* test
$(addprefix clean-,$(SUBDIRS)): clean-%:
$(MAKE) -C $* clean
SUBDIRS = chapter1 chapter2 chapter4 chapter5
.PHONY: all test build $(SUBDIRS) $(addprefix test-,$(SUBDIRS)) $(addprefix clean-,$(SUBDIRS))
all: build
build: $(SUBDIRS)
test: $(addprefix test-,$(SUBDIRS))
clean: $(addprefix clean-,$(SUBDIRS))
$(SUBDIRS):
$(MAKE) -C $@
$(addprefix test-,$(SUBDIRS)): test-%: %
$(MAKE) -C $* test
$(addprefix clean-,$(SUBDIRS)): clean-%:
$(MAKE) -C $* clean
......@@ -9,3 +9,5 @@ love:
clean:
rm -rf main
test:
default:
$(MAKE) all
SUBDIRS = pi maximum mergesort rounding_error strcpy
all:
$(MAKE) -C pi all
$(MAKE) -C maximum all
$(MAKE) -C mergesort all
$(MAKE) -C rounding_error all
$(MAKE) -C strcpy all
.PHONY: all test build $(SUBDIRS) $(addprefix test-,$(SUBDIRS)) $(addprefix clean-,$(SUBDIRS))
clean:
$(MAKE) -C pi clean
$(MAKE) -C maximum clean
$(MAKE) -C mergesort clean
$(MAKE) -C rounding_error clean
$(MAKE) -C strcpy clean
all: build
test:
$(MAKE) -C pi test
$(MAKE) -C maximum test
$(MAKE) -C mergesort test
$(MAKE) -C rounding_error test
$(MAKE) -C strcpy test
build: $(SUBDIRS)
depend:
$(MAKE) -C pi depend
$(MAKE) -C maximum depend
$(MAKE) -C mergesort depend
$(MAKE) -C rounding_error depend
$(MAKE) -C strcpy depend
test: $(addprefix test-,$(SUBDIRS))
clean: $(addprefix clean-,$(SUBDIRS))
$(SUBDIRS):
$(MAKE) -C $@
$(addprefix test-,$(SUBDIRS)): test-%: %
$(MAKE) -C $* test
$(addprefix clean-,$(SUBDIRS)): clean-%:
$(MAKE) -C $* clean
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
SUBDIRS = aslr shlib
endif
.PHONY: all test build $(SUBDIRS) $(addprefix test-,$(SUBDIRS)) $(addprefix clean-,$(SUBDIRS))
all: build
build: $(SUBDIRS)
test: $(addprefix test-,$(SUBDIRS))
clean: $(addprefix clean-,$(SUBDIRS))
$(SUBDIRS):
$(MAKE) -C $@
$(addprefix test-,$(SUBDIRS)): test-%: %
$(MAKE) -C $* test
$(addprefix clean-,$(SUBDIRS)): clean-%:
$(MAKE) -C $* clean
SUBDIRS = lex
.PHONY: all test build $(SUBDIRS) $(addprefix test-,$(SUBDIRS)) $(addprefix clean-,$(SUBDIRS))
all: build
build: $(SUBDIRS)
test: $(addprefix test-,$(SUBDIRS))
clean: $(addprefix clean-,$(SUBDIRS))
$(SUBDIRS):
$(MAKE) -C $@
$(addprefix test-,$(SUBDIRS)): test-%: %
$(MAKE) -C $* test
$(addprefix clean-,$(SUBDIRS)): clean-%:
$(MAKE) -C $* clean
......@@ -14,3 +14,6 @@ varcounter: lex.yy.o
clean:
rm -rf varcounter *.o lex.yy.c lex.yy.h
test:
true
SUBDIRS = kguebung03
.PHONY: all test build $(SUBDIRS) $(addprefix test-,$(SUBDIRS)) $(addprefix clean-,$(SUBDIRS))
all: build
build: $(SUBDIRS)
test: $(addprefix test-,$(SUBDIRS))
clean: $(addprefix clean-,$(SUBDIRS))
$(SUBDIRS):
$(MAKE) -C $@
$(addprefix test-,$(SUBDIRS)): test-%: %
$(MAKE) -C $* test
$(addprefix clean-,$(SUBDIRS)): clean-%:
$(MAKE) -C $* clean
.PHONY: all test build
all: build
build:
$(MAKE) -C PiqRig64 -f Makefile.helper
test:
$(MAKE) -C PiqRig64 -f Makefile.helper test
clean:
$(MAKE) -C PiqRig64 -f Makefile.helper clean
This diff is collapsed.
.PHONY: all build test clean
PLATFORM = $(shell uname)
ifeq ($(PLATFORM),Darwin)
TARGET = PiqRig.app/Contents/MacOS/PiqRig
else
TARGET = PiqRig
endif
all: build
build: $(TARGET)
$(TARGET): Makefile
make
Makefile: PiqRig.pro
qmake
test: $(TARGET)
$(TARGET) Linux_logo.jpg
clean:
[ -f Makefile ] && $(MAKE) clean
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment