Home | History | Annotate | Download | only in Makefiles
      1 ## @file

      2 # Makefile

      3 #

      4 # Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>

      5 # This program and the accompanying materials

      6 # are licensed and made available under the terms and conditions of the BSD License

      7 # which accompanies this distribution.    The full text of the license may be found at

      8 # http://opensource.org/licenses/bsd-license.php

      9 #

     10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,

     11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

     12 #

     13 
     14 DEPFILES = $(OBJECTS:%.o=%.d)
     15 
     16 $(MAKEROOT)/libs-$(ARCH):
     17 	mkdir -p $(MAKEROOT)/libs-$(ARCH)
     18 
     19 .PHONY: install
     20 install: $(MAKEROOT)/libs-$(ARCH) $(LIBRARY)
     21 	cp $(LIBRARY) $(MAKEROOT)/libs-$(ARCH)
     22 
     23 $(LIBRARY): $(OBJECTS) 
     24 	$(BUILD_AR) crs $@ $^
     25 
     26 %.o : %.c 
     27 	$(BUILD_CC)  -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
     28 
     29 %.o : %.cpp
     30 	$(BUILD_CXX) -c $(BUILD_CPPFLAGS) $(BUILD_CXXFLAGS) $< -o $@
     31 
     32 .PHONY: clean
     33 clean:
     34 	@rm -f $(OBJECTS) $(LIBRARY) $(DEPFILES)
     35 
     36 -include $(DEPFILES)
     37