Changeset 1528


Ignore:
Timestamp:
Mar 5, 2007, 3:40:05 AM (15 years ago)
Author:
joshe
Message:

Prettify the BeOS build output.

Location:
trunk/mk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/mk/beos.mk

    r1505 r1528  
    1414LDLIBS   += ../beos/libPrefs/libPrefs.a
    1515
    16 Transmission: $(OBJS) ../beos/Transmission.rsrc
    17         $(CXX) -o $@ $(OBJS) $(LDLIBS) $(LDFLAGS)
    18         xres -o Transmission ../beos/Transmission.rsrc
    19         mimeset -f Transmission
     16Transmission: $(OBJS) ../libtransmission/libtransmission.a ../beos/Transmission.rsrc
     17        $(LINK_RULE_CXX)
     18        $(XRES_RULE)
     19        $(MIMESET_RULE)
    2020
    2121%.o: %.cpp ../mk/config.mk ../mk/common.mk ../mk/beos.mk
    22         $(CXX) $(CXXFLAGS) -o $@ -c $<
     22        $(CXX_RULE)
    2323
    2424clean:
    25         $(RM) Transmission $(OBJS)
     25        @echo "Clean Transmission"
     26        @$(RM) Transmission
     27        @echo "Clean $(OBJS)"
     28        @$(RM) $(OBJS)
    2629
    2730.depend: $(SRCS) ../mk/config.mk ../mk/common.mk ../mk/beos.mk
    28         $(RM) .depend
    29         $(foreach SRC, $(SRCS), $(CXX) $(CXXFLAGS) -MM $(SRC) >> .depend;)
     31        $(DEP_RULE_CXX)
    3032
    3133install:
  • trunk/mk/common.mk

    r1523 r1528  
    4545endef
    4646
     47define DEP_RULE_CXX
     48        @echo "Checking dependencies..."
     49        @$(RM) .depend
     50        @$(foreach SRC, $(SRCS), $(CXX) -MM $(SRC) $(CXXFLAGS) >> .depend;)
     51endef
     52
    4753define CC_RULE
    4854        @echo "Cc $@"
    4955        @CMD="$(CC) $(CFLAGS) -o $@ -c $<"; $$CMD || \
     56          ( echo "Compile line for $@ was:"; echo $$CMD; false )
     57endef
     58
     59define CXX_RULE
     60        @echo "C++ $@"
     61        @CMD="$(CXX) $(CXXFLAGS) -o $@ -c $<"; $$CMD || \
    5062          ( echo "Compile line for $@ was:"; echo $$CMD; false )
    5163endef
     
    5769endef
    5870
     71define LINK_RULE_CXX
     72        @echo "Link $@"
     73        @CMD="$(CXX) -o $@ $(OBJS) $(LDLIBS) $(LDFLAGS)"; $$CMD || \
     74          ( echo "Compile line for $@ was:"; echo $$CMD; false )
     75endef
     76
    5977define MSGFMT_RULE
    6078       @echo "Msgfmt $<"
    6179       @msgfmt -f $< -o $@
     80endef
     81
     82define XRES_RULE
     83        @echo "Xres $@"
     84        @xres -o $@ $@.rsrc
     85endef
     86
     87define MIMESET_RULE
     88        @echo "Mimeset $@"
     89        @mimeset -f $@
    6290endef
    6391
Note: See TracChangeset for help on using the changeset viewer.