1*da816ca0SGreg ClaytonC_SOURCES := main.c a.c b.c c.c
2*da816ca0SGreg ClaytonEXE :=  # Define a.out explicitly
3*da816ca0SGreg ClaytonMAKE_DSYM := NO
4*da816ca0SGreg Clayton
5*da816ca0SGreg Claytonall: a.out
6*da816ca0SGreg Clayton
7*da816ca0SGreg Claytona.out: main.o libfoo.a
8*da816ca0SGreg Clayton	$(LD) $(LDFLAGS) $^ -o $@
9*da816ca0SGreg Clayton
10*da816ca0SGreg Claytonlib_ab.a: a.o b.o
11*da816ca0SGreg Clayton	$(AR) $(ARFLAGS) $@ $^
12*da816ca0SGreg Clayton	$(RM) $^
13*da816ca0SGreg Clayton
14*da816ca0SGreg Clayton# Here we make a .a file that has two a.o files with different modification
15*da816ca0SGreg Clayton# times and different content by first creating libfoo.a with only a.o and b.o,
16*da816ca0SGreg Clayton# then we sleep for 2 seconds, touch c.o to ensure it has a different
17*da816ca0SGreg Clayton# modification time, and then rename c.o to a.o and then add it to the .a file
18*da816ca0SGreg Clayton# again. This is to help test that the module cache will create different
19*da816ca0SGreg Clayton# directories for the two different a.o files.
20*da816ca0SGreg Claytonlibfoo.a: lib_ab.a c.o
21*da816ca0SGreg Clayton	sleep 2
22*da816ca0SGreg Clayton	touch c.o
23*da816ca0SGreg Clayton	mv c.o a.o
24*da816ca0SGreg Clayton	$(AR) $(ARFLAGS) $@ lib_ab.a a.o
25*da816ca0SGreg Clayton	$(RM) a.o
26*da816ca0SGreg Clayton
27*da816ca0SGreg Claytoninclude Makefile.rules
28