"Fossies" - the Fresh Open Source Software Archive

Member "i2c-tools-4.3/eeprog/Module.mk" (22 Jul 2021, 1697 Bytes) of package /linux/misc/i2c-tools-4.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Make source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "Module.mk": 4.1_vs_4.2.

    1 # eeprog
    2 #
    3 # This program is free software; you can redistribute it and/or modify
    4 # it under the terms of the GNU General Public License as published by
    5 # the Free Software Foundation; either version 2 of the License, or
    6 # (at your option) any later version.
    7 
    8 EEPROG_DIR  := eeprog
    9 
   10 EEPROG_CFLAGS   += -Iinclude
   11 ifeq ($(USE_STATIC_LIB),1)
   12 EEPROG_LDFLAGS  += $(LIB_DIR)/$(LIB_STLIBNAME)
   13 else
   14 EEPROG_LDFLAGS  += -L$(LIB_DIR) -li2c
   15 endif
   16 
   17 EEPROG_TARGETS  := eeprog
   18 
   19 #
   20 # Programs
   21 #
   22 
   23 $(EEPROG_DIR)/eeprog: $(EEPROG_DIR)/eeprog.o $(EEPROG_DIR)/24cXX.o $(LIB_DEPS)
   24     $(CC) $(LDFLAGS) -o $@ $^ $(EEPROG_LDFLAGS)
   25 
   26 #
   27 # Objects
   28 #
   29 
   30 $(EEPROG_DIR)/eeprog.o: $(EEPROG_DIR)/eeprog.c $(EEPROG_DIR)/24cXX.h
   31     $(CC) $(CFLAGS) $(EEPROG_CFLAGS) -c $< -o $@
   32 
   33 $(EEPROG_DIR)/24cXX.o: $(EEPROG_DIR)/24cXX.c $(EEPROG_DIR)/24cXX.h $(INCLUDE_DIR)/i2c/smbus.h
   34     $(CC) $(CFLAGS) $(EEPROG_CFLAGS) -c $< -o $@
   35 
   36 #
   37 # Commands
   38 #
   39 
   40 all-eeprog: $(addprefix $(EEPROG_DIR)/,$(EEPROG_TARGETS))
   41 
   42 strip-eeprog: $(addprefix $(EEPROG_DIR)/,$(EEPROG_TARGETS))
   43     $(STRIP) $(addprefix $(EEPROG_DIR)/,$(EEPROG_TARGETS))
   44 
   45 clean-eeprog:
   46     $(RM) $(addprefix $(EEPROG_DIR)/,*.o $(EEPROG_TARGETS))
   47 
   48 install-eeprog: $(addprefix $(EEPROG_DIR)/,$(EEPROG_TARGETS))
   49     $(INSTALL_DIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir)
   50     for program in $(EEPROG_TARGETS) ; do \
   51     $(INSTALL_PROGRAM) $(EEPROG_DIR)/$$program $(DESTDIR)$(sbindir) ; \
   52     $(INSTALL_DATA) $(EEPROG_DIR)/$$program.8 $(DESTDIR)$(man8dir) ; done
   53 
   54 uninstall-eeprog:
   55     for program in $(EEPROG_TARGETS) ; do \
   56     $(RM) $(DESTDIR)$(sbindir)/$$program ; \
   57     $(RM) $(DESTDIR)$(man8dir)/$$program.8 ; done
   58 
   59 all: all-eeprog
   60 
   61 strip: strip-eeprog
   62 
   63 clean: clean-eeprog
   64 
   65 install: install-eeprog
   66 
   67 uninstall: uninstall-eeprog