makefiles-garage/bintools/checklib/Makefile
changeset 1 820b22e13ff1
parent 0 37428ad74fc2
equal deleted inserted replaced
0:37428ad74fc2 1:820b22e13ff1
     9 # Mike Kinghan, mikek@symbian.org
     9 # Mike Kinghan, mikek@symbian.org
    10 #
    10 #
    11 # Contributors:
    11 # Contributors:
    12 #
    12 #
    13 # Description:
    13 # Description:
    14 # This is a Linux makefile for checklib. 
    14 # This is a Linux makefile for checklib.
    15 
       
    16 
    15 
    17 ifdef EPOCROOT
    16 ifdef EPOCROOT
    18 include $(EPOCROOT)/build/makefiles-garage/global-make-env.mk
    17 include $(EPOCROOT)/build/makefiles-garage/global-make-env.mk
    19 else
    18 else
    20 $(error EPOCROOT must be defined as the parent directory of your epoc32 tree)
    19 $(error EPOCROOT must be defined as the parent directory of your epoc32 tree)
    21 endif
    20 endif
    22 
    21 
    23 todo_target = checklib
    22 cpp_inc_paths = -I . -I object/coff -I ..
    24 include $(EPOCROOT)/build/makefiles-garage/todo.mk
       
    25 all: todo
       
    26 
    23 
       
    24 lib_opts =
       
    25 
       
    26 exe = checklib
       
    27 
       
    28 CPPFLAGS = $(cpp_inc_paths) $(global_cpp_flags)
       
    29 LDFLAGS = $(lib_opts) $(global_ld_flags)
       
    30 
       
    31 prereqs =
       
    32 
       
    33 srcs = main.cpp \
       
    34 library/library.cpp \
       
    35 misc/endian.cpp \
       
    36 object/object.cpp \
       
    37 object/elf_object.cpp \
       
    38 object/coff_object.cpp \
       
    39 object/elf/elf_file_header.cpp \
       
    40 object/elf/elf_section_header.cpp \
       
    41 object/elf/elf_symbol.cpp \
       
    42 object/elf/elf_string_table.cpp \
       
    43 object/coff/coff_file_header.cpp \
       
    44 object/coff/coff_symbol.cpp \
       
    45 object/coff/coff_string_table.cpp
       
    46 
       
    47 
       
    48 .PHONY: all clean $(prereqs)
       
    49 
       
    50 all: $(exe)
       
    51 
       
    52 bases = $(basename $(srcs))
       
    53 
       
    54 objs = $(addsuffix .o,$(bases))
       
    55 
       
    56 $(prereqs): $(global_prereqs)
       
    57 	$(MAKE) -C $(EPOCROOT)/build $@
       
    58 
       
    59 $(objs): $(prereqs)
       
    60  
       
    61 $(exe): $(objs)
       
    62 	$(CC) -o $@ $(objs) $(LDFLAGS)
       
    63 
       
    64 clean:
       
    65 	rm -f $(objs) $(exe)
       
    66