vmod/vmodttl: fixed bug related to luns not ordered and/or not starting from zero.
[ht-drivers.git] / utils / install / Makefile
blobef1c0ec18cea1322b5cb2eeba56a2670e5437f79
1 ###############################################################################
2 # @file Makefile
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; \
14 else \
15 echo ../Makefile.specific; \
16 fi)
18 include ../Makefile
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
26 LDLIBS = $(XTRALIBS)
28 SRCFILES = instprog.c inst-utils.c
30 ifeq ($(CPU), ppc4)
31 # nothing to include for Lynx
32 else
33 SRCFILES += inst-linux.c
34 endif
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
46 linux:
47 @echo -e "\nCompiling for Linux:"
48 $(Q)$(MAKE) _build CPU=L865
50 lynx:
51 @echo -e "\nCompiling for Lynx:"
52 $(Q)$(MAKE) _build CPU=ppc4
54 all:
55 $(Q)$(MAKE) linux
56 $(Q)$(MAKE) lynx
58 test:
59 $(Q)$(MAKE) -C test
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
70 clean clear:
71 rm -rf object/ instprog.$(CPU)