makefile.std
来自「一个linux下rs485驱动程序的源代码」· STD 代码 · 共 97 行
STD
97 行
#*******************************************************************# uLan Communication - Makefile for uLan library compilation## (C) Copyright 2000 by Pavel Pisa ## The uLan driver is distributed under the Gnu General Public Licence. # See file COPYING for details.## Author reserves right to use and publish sources for embedded # applications under different conditions too.#*******************************************************************all : defaultdefault : library# Select compilerCC=gcc# Basic compilation flagsCFLAGS += -Wall -Wstrict-prototypes CFLAGS += -O2CFLAGS += -I. -I..CFLAGS += -ggdb# CFLAGS for the uLan library# note: some macro expansions require at least -OLCFLAGS= $(CFLAGS)LCFLAGS+= $(CPUFLAGS)# uncomment the next line if you want a shared library# LIB_SHARED = 1LIB_OBJS = ul_l_drv.lo ul_l_msg.lo ul_l_oi.lo ul_l_log.lo# DJGPP = 1ifdef DJGPPLIB_OBJS += ul_drv.loMORE_C_FILES += ../ul_drv/ul_drv.cul_drv.lo: ../ul_drv/ul_drv.c $(CC) -o $@ $(LCFLAGS) -D UL_WITH_PCI -I ../ul_drv -c $<endififndef LIB_SHAREDLIBULAN = libulan.a%.lo: %.c $(CC) -o $@ $(LCFLAGS) -c $<$(LIBULAN): $(LIB_OBJS) ar rcs $(LIBULAN) $^ ranlib $(LIBULAN)else%.lo: %.c $(CC) --shared -o $@ $(LCFLAGS) -c $<LIBULAN = libulan.so.0.0.4$(LIBULAN): $(LIB_OBJS) ld --shared --soname=$(LIBULAN) -o $(LIBULAN) $^ ln -s -f $(LIBULAN) libulan.soendiful_lib/ul_fd.h : ul_lib/ul_fd4dir.h cp $< $@library : ul_lib/ul_fd.h library: $(LIBULAN).SUFFIXES: .i .s%.c : %.i $(CC) -E $(CFLAGS) $< >$@%.c : %.s $(CC) -S $(CFLAGS) $<dep: $(CC) $(CFLAGS) $(CPPFLAGS) -w -E -M *.c $(MORE_C_FILES) | \ sed 's/\.o/.lo/g' > dependdepend: @touch dependclean : rm -f depend *.o *.lo *~ *.a *.so *.so.*-include depend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?