]>
Commit | Line | Data |
---|---|---|
964d3577 A |
1 | SOURCES := $(wildcard *.c) |
2 | TARGETS := $(patsubst %.c,%,$(SOURCES)) | |
3 | TESTS := $(patsubst %,test-%,$(TARGETS)) | |
4 | ||
3a6437e6 A |
5 | include Makefile.common |
6 | ||
7 | CFLAGS += -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders | |
8 | ||
9 | %: %.c | |
10 | $(CC) -o $(BUILDDIR)/$@ $< $(CFLAGS) | |
964d3577 A |
11 | |
12 | all: $(TARGETS) | |
13 | ||
14 | test check: $(TESTS) | |
15 | ||
16 | $(TESTS): test-%: % | |
17 | @echo "[TEST] $<" | |
18 | @$(TEST_ENV) ./$< | |
19 | @echo "[END] $<" | |
20 | @echo | |
21 | ||
22 | clean: | |
23 | rm -f $(TARGETS) | |
24 | ||
3a6437e6 A |
25 | setup: |
26 | mkdir -p $(BUILDDIR) | |
27 | ||
28 | ||
29 | # B&I Targets | |
30 | ||
31 | installhdrs: | |
32 | ||
33 | install: setup all | |
34 | ||
35 | ||
964d3577 | 36 | .PHONY: all test check clean $(TESTS) |