aboutsummaryrefslogtreecommitdiffstats
path: root/testcase/eval.mk
blob: 1cddf524f0bb35671119b22df0892a0acc78a54b (plain)
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
test1:
	touch server.c server_priv.c server_access.c
	touch client.c client_api.c client_mem.c

test2: all

PROGRAMS    = server client

server_OBJS = server.o server_priv.o server_access.o

client_OBJS = client.o client_api.o client_mem.o

# Everything after this is generic

.PHONY: all
all: $(PROGRAMS)

define PROGRAM_template
 $(1): $$($(1)_OBJS)
 ALL_OBJS += $$($(1)_OBJS)
endef

$(foreach prog,$(PROGRAMS),$(eval $(call PROGRAM_template,$(prog))))

$(PROGRAMS):
	echo $^ -o $@

clean:
	rm -f $(ALL_OBJS) $(PROGRAMS)