makefiles-garage/imgtools/sisutils/Makefile
changeset 1 820b22e13ff1
parent 0 37428ad74fc2
equal deleted inserted replaced
0:37428ad74fc2 1:820b22e13ff1
    18 include $(EPOCROOT)/build/makefiles-garage/global-make-env.mk
    18 include $(EPOCROOT)/build/makefiles-garage/global-make-env.mk
    19 else
    19 else
    20 $(error EPOCROOT must be defined as the parent directory of your epoc32 tree)
    20 $(error EPOCROOT must be defined as the parent directory of your epoc32 tree)
    21 endif
    21 endif
    22 
    22 
    23 todo_target = seclib
    23 #todo_target = seclib
    24 include $(EPOCROOT)/build/makefiles-garage/todo.mk
    24 #include $(EPOCROOT)/build/makefiles-garage/todo.mk
    25 all: todo
    25 #all: todo
    26 
    26 
       
    27 cpp_inc_paths = -I inc
       
    28 
       
    29 lib = libsisutils.a
       
    30 
       
    31 CPPFLAGS = $(cpp_inc_paths) $(global_cpp_flags) 
       
    32 
       
    33 srcs = \
       
    34 src/sisutils.cpp \
       
    35 src/sis2iby.cpp \
       
    36 src/pkglanguage.cpp \
       
    37 src/pkgfileparser.cpp
       
    38 
       
    39 fixfiles = src/sisutils.cpp src/sis2iby.cpp src/pkgfileparser.cpp inc/pkgfileparser.h inc/sisutils.h
       
    40 fixbackups = $(addsuffix .original,$(fixfiles))
       
    41 
       
    42 all: $(lib)
       
    43 
       
    44 .PHONY: all clean fixes remove_fixes
       
    45 
       
    46 $(srcs): fixes
       
    47 
       
    48 bases = $(basename $(srcs))
       
    49 
       
    50 objs = $(addsuffix .o,$(bases))
       
    51 
       
    52 $(lib): $(objs)
       
    53 	ar r $@ $(objs)
       
    54 
       
    55 clean: remove_fixes
       
    56 	rm -f $(objs) $(lib)
       
    57 
       
    58 fixes:: $(fixbackups)
       
    59 
       
    60 $(fixbackups):
       
    61 	cp $(basename $@) $@ && \
       
    62 	cp -f $(EPOCROOT)/build/clobber/imgtools/sisutils/$(basename $@) $(EPOCROOT)/build/imgtools/sisutils/$(basename $@) 
       
    63 	
       
    64 remove_fixes: 
       
    65 	for file in $(fixbackups); do if [ -f $$file ]; then mv -f $$file $${file%\.original}; fi; done
       
    66