You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
338 B
20 lines
338 B
srcs = $(wildcard *.c)
|
|
libs = $(srcs:.c=.so)
|
|
|
|
flags = -fPIC
|
|
|
|
all: $(libs)
|
|
|
|
clean:
|
|
rm $(libs)
|
|
|
|
no_debug_info.so: no_debug_info.c Makefile
|
|
$(CC) $< -shared $(flags) -o $@
|
|
|
|
link_against_me.so: link_against_me.c
|
|
$(CC) $< -shared $(flags) -o $@
|
|
|
|
%.so: %.c Makefile link_against_me.so
|
|
$(CC) $< -shared $(flags) -g -o $@ link_against_me.so
|
|
|