1 ###############################################################################
4 # @brief Build generic installation program.
6 # @author Copyright (C) 2009 CERN. Yury GEORGIEVSKIY <ygeorgie@cern.ch>
8 # @date Created on 09/06/2009
9 ###############################################################################
11 # Makefile from current directory supress one from upper level
12 include $(shell if
[ -e .
/Makefile.specific
]; then \
13 echo .
/Makefile.specific
; \
15 echo ..
/Makefile.specific
; \
21 # libraries (and their pathes) to link executable file with
22 XTRALIBDIRS
= ..
/$(ROOTDIR
)/utils
/user
/object
23 LOADLIBES
:= $(addprefix -L
,$(XTRALIBDIRS
)) $(LOADLIBES
) -lutils.
$(CPU
)
25 XTRALIBS
= -lxml2
-lz
-g
28 SRCFILES
= instprog.c inst-utils.c
31 # nothing to include for Lynx
33 SRCFILES
+= inst-linux.c
36 EXEC_OBJS
= instprog.
$(CPU
)
39 $(EXEC_OBJS
): $(OBJFILES
)
41 .PHONY
: _build linux lynx
all test move_objs
clean clear
43 _build
: $(EXEC_OBJS
) $(OBJDIR
) move_objs
47 @echo
-e
"\nCompiling for Linux:"
48 $(Q
)$(MAKE
) _build CPU
=L865
51 @echo
-e
"\nCompiling for Lynx:"
52 $(Q
)$(MAKE
) _build CPU
=ppc4
61 # Move compiled files to proper place
62 move_objs
: $(FINAL_DEST
)
63 $(Q
)mv
$(OBJFILES
) $(OBJDIR
)
64 $(Q
)mv
$(EXEC_OBJS
) ..
/$(FINAL_DEST
)
67 INCDIRS
= .
/ ..
/$(ROOTDIR
) ..
/$(ROOTDIR
)/include
68 ADDCFLAGS
+= $(addprefix -I
,$(INCDIRS
)) -g
71 rm -rf object
/ instprog.
$(CPU
)