Changeset 198


Ignore:
Timestamp:
Apr 4, 2006, 8:23:19 PM (16 years ago)
Author:
titer
Message:

Nicer make output. Also moved the CLI client to its own folder like
other interfaces.

Location:
trunk
Files:
2 added
8 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 transmissioncli
        21Makefile.config
        32.depend
  • trunk/Makefile

    r191 r198  
    44ifneq ($(SYSTEM),Darwin)
    55
    6 SRCS = transmissioncli.c
    7 OBJS = $(SRCS:%.c=%.o)
    8 
    9 CFLAGS += -Ilibtransmission
    10 
    11 all: transmissioncli transmission-gtk transmission-beos
    12 
    13 lib:
    14         $(MAKE) -C libtransmission
    15 
    16 transmissioncli: lib $(OBJS)
    17         $(CC) -o $@ $(OBJS) libtransmission/libtransmission.a $(LDFLAGS)
    18 
    19 transmission-gtk:
     6TARGETS = .cli
    207ifeq ($(GTK),yes)
    21         $(MAKE) -C gtk
     8TARGETS += .gtk
     9endif
     10ifeq ($(SYSTEM),BeOS)
     11TARGETS += .beos
    2212endif
    2313
    24 transmission-beos:
    25 ifeq ($(SYSTEM),BeOS)
    26         $(MAKE) -C beos
    27 endif
     14all: $(TARGETS)
    2815
    29 %.o: %.c Makefile.config Makefile.common Makefile
    30         $(CC) $(CFLAGS) -o $@ -c $<
     16.lib:
     17        @echo "* Building libtransmission"
     18        @$(MAKE) -C libtransmission $(MAKESHUTUP)
     19
     20.cli: .lib
     21        @echo "* Building Transmission CLI client"
     22        @$(MAKE) -C cli $(MAKESHUTUP)
     23
     24.gtk: .lib
     25        @echo "* Building Transmission GTK+ client"
     26        @$(MAKE) -C gtk $(MAKESHUTUP)
     27
     28.beos: .lib
     29        @echo "* Building Transmission BeOS client"
     30        @make -C beos $(MAKESHUTUP)
    3131
    3232clean:
    33         $(RM) transmissioncli $(OBJS)
    34         $(MAKE) -C libtransmission clean
     33        @$(MAKE) -C libtransmission clean $(MAKESHUTUP)
     34        @$(MAKE) -C cli clean $(MAKESHUTUP)
    3535ifeq ($(GTK),yes)
    36         $(MAKE) -C gtk clean
     36        @$(MAKE) -C gtk clean $(MAKESHUTUP)
    3737endif
    3838ifeq ($(SYSTEM),BeOS)
    39         $(MAKE) -C beos clean
     39        @$(MAKE) -C beos clean $(MAKESHUTUP)
    4040endif
    41 
    42 .depend: $(SRCS) Makefile
    43         $(RM) .depend
    44         $(foreach SRC, $(SRCS), $(CC) -MM -Ilibtransmission $(SRC) >> .depend;)
    45 
    46 include .depend
    4741
    4842else
    4943
    5044all:
    51         make -C macosx
     45        $(MAKE) -C macosx
    5246        xcodebuild -alltargets -activeconfiguration | grep -v "^$$"
    5347
    5448clean:
    5549        xcodebuild -alltargets -activeconfiguration clean | grep -v "^$$"
    56         make -C macosx clean
     50        $(MAKE) -C macosx clean
    5751
    5852MAKELINK = printf "[InternetShortcut]\nURL=http://%s\n"
     
    6256            Transmission-$(VERSION_STRING).dmg && \
    6357          mkdir -p tmp && \
    64           cp -r Transmission.app tmp/ && \
     58          cp -r macosx/Transmission.app tmp/ && \
    6559          cp AUTHORS tmp/AUTHORS.txt && \
    6660          cp LICENSE tmp/LICENSE.txt && \
  • trunk/Makefile.common

    r191 r198  
    3535LDFLAGS += -lcrypto
    3636endif
     37
     38#
     39# Utils
     40#
     41
     42define DEP_RULE
     43        @echo "Checking dependencies..."
     44        @$(RM) .depend
     45        @$(foreach SRC, $(SRCS), $(CC) -MM $(SRC) $(CFLAGS) >> .depend;)
     46endef
     47
     48define CC_RULE
     49        @echo "Cc $@"
     50        @CMD="$(CC) $(CFLAGS) -o $@ -c $<"; $$CMD || \
     51          ( echo "Compile line for $@ was:"; echo $$CMD; false )
     52endef
     53
     54define LINK_RULE
     55        @echo "Link $@"
     56        @CMD="$(CC) -o $@ $(OBJS) $(LDFLAGS)"; $$CMD || \
     57          ( echo "Compile line for $@ was:"; echo $$CMD; false )
     58endef
     59
     60MAKE += --no-print-directory
  • trunk/Transmission.xcodeproj/project.pbxproj

    r184 r198  
    635635                        isa = XCBuildConfiguration;
    636636                        buildSettings = {
    637                                 CONFIGURATION_BUILD_DIR = "$(SRCROOT)";
     637                                CONFIGURATION_BUILD_DIR = "$(SRCROOT)/cli";
    638638                                LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/build/debug\"";
    639639                                OTHER_CFLAGS = (
     
    655655                        isa = XCBuildConfiguration;
    656656                        buildSettings = {
    657                                 CONFIGURATION_BUILD_DIR = "$(SRCROOT)";
     657                                CONFIGURATION_BUILD_DIR = "$(SRCROOT)/macosx";
    658658                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
    659659                                GCC_PREFIX_HEADER = macosx/Transmission_Prefix.pch;
  • trunk/beos

    • Property svn:ignore set to
      .depend
      Transmission
  • trunk/gtk

    • Property svn:ignore set to
      .depend
      defines.h
      transmission-gtk
  • trunk/gtk/Makefile

    r195 r198  
    66
    77CFLAGS  += $(CFLAGS_GTK) -I../libtransmission
    8 LDFLAGS += $(LDFLAGS_GTK)
     8LDFLAGS += $(LDFLAGS_GTK) ../libtransmission/libtransmission.a
    99
    1010transmission-gtk: $(OBJS)
    11         $(CC) -o $@ $(OBJS) ../libtransmission/libtransmission.a $(LDFLAGS)
     11        $(LINK_RULE)
    1212
    1313%.o: %.c ../Makefile.config ../Makefile.common Makefile
    14         $(CC) $(CFLAGS) -o $@ -c $<
     14        $(CC_RULE)
    1515
    1616clean:
    17         $(RM) transmission-gtk $(OBJS)
     17        @echo "Clean transmission-gtk"
     18        @$(RM) transmission-gtk
     19        @echo "Clean $(OBJS)"
     20        @$(RM) $(OBJS)
    1821
    19 .depend: $(SRCS) Makefile
    20         $(RM) .depend
    21         $(foreach SRC, $(SRCS), $(CC) -MM $(SRC) $(CFLAGS) -D__TRANSMISSION__ >> .depend;)
     22.depend: $(SRCS) ../Makefile.config ../Makefile.common Makefile
     23        $(DEP_RULE)
    2224
    2325include .depend
  • trunk/libtransmission/Makefile

    r191 r198  
    1010
    1111libtransmission.a: $(OBJS)
    12         ar ru $@ $(OBJS)
    13         ranlib $@
     12        @echo "Library $@"
     13        @ar ru $@ $(OBJS)
     14        @ranlib $@
    1415
    1516%.o: %.c ../Makefile.config ../Makefile.common Makefile
    16         $(CC) $(CFLAGS) -o $@ -c $<
     17        $(CC_RULE)
    1718
    1819clean:
    19         $(RM) libtransmission.a $(OBJS)
     20        @echo "Clean libtransmission.a"
     21        @echo "Clean $(OBJS)"
     22        @$(RM) libtransmission.a $(OBJS)
    2023
    21 .depend: $(SRCS) Makefile
    22         $(RM) .depend
    23         $(foreach SRC, $(SRCS), $(CC) -MM $(SRC) $(CFLAGS) >> .depend;)
     24.depend: $(SRCS) ../Makefile.config ../Makefile.common Makefile
     25        $(DEP_RULE)
    2426
    2527include .depend
Note: See TracChangeset for help on using the changeset viewer.