Minor optimization.
This commit is contained in:
parent
5f3f2d4f4d
commit
0b59941102
25
GNUmakefile
25
GNUmakefile
@ -220,44 +220,35 @@ admin_BINARY=uhub-admin$(BIN_EXT)
|
|||||||
autotest_BINARY=autotest/test$(BIN_EXT)
|
autotest_BINARY=autotest/test$(BIN_EXT)
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(MSG_CC) $(CC) -c $(CFLAGS) -o $@.tmp $^ && \
|
$(MSG_CC) $(CC) -c $(CFLAGS) -o $@ $^
|
||||||
$(MV) $@.tmp $@
|
|
||||||
|
|
||||||
all: $(uhub_BINARY) $(PCH)
|
all: $(uhub_BINARY) $(PCH)
|
||||||
|
|
||||||
$(adcrush_BINARY): $(PCH) $(LIBUHUB) $(adcrush_OBJECTS)
|
$(adcrush_BINARY): $(PCH) $(LIBUHUB) $(adcrush_OBJECTS)
|
||||||
$(MSG_LD) $(CC) -o $@.tmp $(adcrush_OBJECTS) $(LIBUHUB) $(LDFLAGS) $(LDLIBS) && \
|
$(MSG_LD) $(CC) -o $@ $(adcrush_OBJECTS) $(LIBUHUB) $(LDFLAGS) $(LDLIBS)
|
||||||
$(MV) $@.tmp $@
|
|
||||||
|
|
||||||
$(admin_BINARY): $(PCH) $(LIBUHUB) $(admin_OBJECTS)
|
$(admin_BINARY): $(PCH) $(LIBUHUB) $(admin_OBJECTS)
|
||||||
$(MSG_LD) $(CC) -o $@.tmp $(admin_OBJECTS) $(LIBUHUB) $(LDFLAGS) $(LDLIBS) && \
|
$(MSG_LD) $(CC) -o $@ $(admin_OBJECTS) $(LIBUHUB) $(LDFLAGS) $(LDLIBS)
|
||||||
$(MV) $@.tmp $@
|
|
||||||
|
|
||||||
$(uhub_BINARY): $(PCH) $(LIBUHUB) $(uhub_OBJECTS)
|
$(uhub_BINARY): $(PCH) $(LIBUHUB) $(uhub_OBJECTS)
|
||||||
$(MSG_LD) $(CC) -o $@.tmp $(uhub_OBJECTS) $(LIBUHUB) $(LDFLAGS) $(LDLIBS) && \
|
$(MSG_LD) $(CC) -o $@ $(uhub_OBJECTS) $(LIBUHUB) $(LDFLAGS) $(LDLIBS)
|
||||||
$(MV) $@.tmp $@
|
|
||||||
|
|
||||||
$(LIBUHUB): $(libuhub_OBJECTS)
|
$(LIBUHUB): $(libuhub_OBJECTS)
|
||||||
$(MSG_AR) $(AR) rc $@.tmp $^ && \
|
$(MSG_AR) $(AR) rc $@ $^ && $(RANLIB) $@
|
||||||
$(RANLIB) $@.tmp && \
|
|
||||||
$(MV) $@.tmp $@
|
|
||||||
|
|
||||||
ifeq ($(USE_PCH),YES)
|
ifeq ($(USE_PCH),YES)
|
||||||
$(PCH): $(uhub_HEADERS)
|
$(PCH): $(uhub_HEADERS)
|
||||||
$(MSG_PCH) $(CC) $(CFLAGS) -o $@.tmp $(PCHSRC) && \
|
$(MSG_PCH) $(CC) $(CFLAGS) -o $@ $(PCHSRC)
|
||||||
$(MV) $@.tmp $@
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
autotest.c: $(autotest_SOURCES)
|
autotest.c: $(autotest_SOURCES)
|
||||||
$(shell exotic --standalone $(autotest_SOURCES) > $@)
|
$(shell exotic --standalone $(autotest_SOURCES) > $@)
|
||||||
|
|
||||||
$(autotest_OBJECTS): autotest.c
|
$(autotest_OBJECTS): autotest.c
|
||||||
$(MSG_CC) $(CC) -c $(CFLAGS) -Isrc -o $@.tmp $< && \
|
$(MSG_CC) $(CC) -c $(CFLAGS) -Isrc -o $@ $<
|
||||||
$(MV) $@.tmp $@
|
|
||||||
|
|
||||||
$(autotest_BINARY): $(autotest_OBJECTS) $(LIBUHUB)
|
$(autotest_BINARY): $(autotest_OBJECTS) $(LIBUHUB)
|
||||||
$(MSG_LD) $(CC) -o $@.tmp $^ $(LDFLAGS) $(LDLIBS) && \
|
$(MSG_LD) $(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)
|
||||||
$(MV) $@.tmp $@
|
|
||||||
|
|
||||||
autotest: $(autotest_BINARY)
|
autotest: $(autotest_BINARY)
|
||||||
@./$(autotest_BINARY) -s -f
|
@./$(autotest_BINARY) -s -f
|
||||||
|
Loading…
Reference in New Issue
Block a user