Files
s390-tools/libutil/Makefile
Alexander Egorenkov 34482d67c0 libutil: Refactor and clean up Makefile
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>
2021-07-05 13:57:00 +02:00

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)