Makefile: Avoid duplicating code
authorBart Van Assche <bvanassche@acm.org>
Mon, 6 Jan 2020 02:16:20 +0000 (18:16 -0800)
committerBart Van Assche <bvanassche@acm.org>
Mon, 6 Jan 2020 18:07:34 +0000 (10:07 -0800)
Use the default compilation rule for building init.o instead of duplicating
it.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Makefile

index dd26afca16fe413e440ba728d4292116e493c305..271269f9256485ac16364a6f41aee6092f3c0987 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -426,19 +426,6 @@ parse.o: lex.yy.o y.tab.o
 endif
 
 init.o: init.c FIO-VERSION-FILE
-       @mkdir -p $(dir $@)
-       $(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) -c $<
-       @$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SRCDIR)/$*.c > $*.d
-       @mv -f $*.d $*.d.tmp
-       @sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
-ifeq ($(CONFIG_TARGET_OS), NetBSD)
-       @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | tr -cs "[:graph:]" "\n" | \
-               sed -e 's/^ *//' -e '/^$$/ d' -e 's/$$/:/' >> $*.d
-else
-       @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -w 1 | \
-               sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
-endif
-       @rm -f $*.d.tmp
 
 gcompat.o: gcompat.c gcompat.h
        $(QUIET_CC)$(CC) $(CFLAGS) $(GTK_CFLAGS) $(CPPFLAGS) -c $<