xref: /llvm-project/lldb/test/API/functionalities/module_cache/bsd/Makefile (revision da816ca0cb3b1367fe90b3e6fb73439c93ed80df)
1C_SOURCES := main.c a.c b.c c.c
2EXE :=  # Define a.out explicitly
3MAKE_DSYM := NO
4
5all: a.out
6
7a.out: main.o libfoo.a
8	$(LD) $(LDFLAGS) $^ -o $@
9
10lib_ab.a: a.o b.o
11	$(AR) $(ARFLAGS) $@ $^
12	$(RM) $^
13
14# Here we make a .a file that has two a.o files with different modification
15# times and different content by first creating libfoo.a with only a.o and b.o,
16# then we sleep for 2 seconds, touch c.o to ensure it has a different
17# modification time, and then rename c.o to a.o and then add it to the .a file
18# again. This is to help test that the module cache will create different
19# directories for the two different a.o files.
20libfoo.a: lib_ab.a c.o
21	sleep 2
22	touch c.o
23	mv c.o a.o
24	$(AR) $(ARFLAGS) $@ lib_ab.a a.o
25	$(RM) a.o
26
27include Makefile.rules
28