mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Use idiomatic make constructs. Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com> Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
22 lines
354 B
Makefile
22 lines
354 B
Makefile
include ../common.mak
|
|
|
|
lib := libutil.a
|
|
|
|
sources := $(filter-out %_example.c,$(wildcard *.c))
|
|
objects := $(patsubst %.c,%.o,$(sources))
|
|
|
|
examples := $(patsubst %.c,%,$(wildcard *_example.c))
|
|
|
|
all: $(lib)
|
|
examples: $(examples)
|
|
|
|
$(examples): %: %.o $(lib)
|
|
|
|
$(lib): $(objects)
|
|
$(lib): ALL_CFLAGS += -fPIC
|
|
|
|
install: all
|
|
|
|
clean:
|
|
rm -f *.o $(lib) $(examples)
|