五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

Makefile

2023-03-02 22:08 作者:小粉絲8  | 我要投稿

// Makefile

SUBDIRS = main foo

all : $(SUBDIRS)

install : $(SUBDIRS)

# $(call version_number,1.2.3) # major.minor.patch

# libtool manual chapter 4.2: -version-number

define version_number

? $(MAKE) -C $@ soname=lib$@.so.$(word 1,$(subst ., ,$(1)))

? @ cp $@/$@ $@/lib$@.so.$(1)

? @ cd $@; ln -f -s lib$@.so.$(1) lib$@.so.$(word 1,$(subst ., ,$(1))); cd ..

? @ cd $@; ln -f -s lib$@.so.$(1) lib$@.so; cd ..

endef

main : foo

main :

? $(MAKE) -C $@

foo :

? $(call version_number,5.2.3)

# make DESTDIR=~/foo install

install :

? install -d "$(DESTDIR)/usr/local/bin"

? install -d "$(DESTDIR)/usr/local/lib"

? install -m 0755 main/main "$(DESTDIR)/usr/local/bin"

? install -m 0755 foo/*.so* "$(DESTDIR)/usr/local/lib"

clean :

? @ for dir in $(SUBDIRS); do \

? ? $(MAKE) -C $$dir $@; \

? done

.PHONY : $(SUBDIRS) all install clean


---


// main/Makefile

# build shared library with -fPIC, -shared

CFLAGS ? = # -g -O3 -fPIC # CXXFLAGS for .cpp

CPPFLAGS = -MMD -MP -I../foo

LDFLAGS ?= -L../foo -Wl,-rpath,'$$ORIGIN/../foo' # -shared

LDLIBS ? = -lfoo

#CC ? ? ?= $(CXX) # link with CXX for .cpp

LDFLAGS += -Wl,-rpath,'$$ORIGIN/../lib'

#LDFLAGS += -Wl,-soname,$(soname)

# make # NDEBUG=1

ifdef NDEBUG

CPPFLAGS += -DNDEBUG

CFLAGS += -O3 # .cpp

else

CFLAGS += -g # .cpp

LDFLAGS += -fsanitize=address

endif

all : main # foo

# target name is basename of one of the source files

main : $(patsubst %.c,%.o,$(wildcard *.c)) # .cpp

#foo : $(patsubst %.c,%.o,foo.c) # .cpp

-include *.d

clean : ; -rm -fr *.o *.d main

.PHONY : all clean


---


// foo/Makefile

# build shared library with -fPIC, -shared

CFLAGS ? = -fPIC # -g -O3 # CXXFLAGS for .cpp

CPPFLAGS = -MMD -MP # -I../bar

LDFLAGS ?= -shared # -L../bar -Wl,-rpath,'$$ORIGIN/../bar'

LDLIBS ? = #-lbar

#CC ? ? ?= $(CXX) # link with CXX for .cpp

LDFLAGS += -Wl,-rpath,'$$ORIGIN/../lib'

LDFLAGS += -Wl,-soname,$(soname)

# make # NDEBUG=1

ifdef NDEBUG

CPPFLAGS += -DNDEBUG

CFLAGS += -O3 # .cpp

else

CFLAGS += -g # .cpp

LDFLAGS += -fsanitize=address

endif

all : foo # bar

# target name is basename of one of the source files

foo : $(patsubst %.c,%.o,$(wildcard *.c)) # .cpp

#bar : $(patsubst %.c,%.o,bar.c) # .cpp

-include *.d

clean : ; -rm -fr *.o *.d foo *.so*

.PHONY : all clean


Makefile的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國家法律
游戏| 长汀县| 沧州市| 科尔| 手机| 上蔡县| 深圳市| 大渡口区| 江川县| 双桥区| 新化县| 永城市| 洪江市| 烟台市| 类乌齐县| 娱乐| 哈密市| 枣庄市| 云龙县| 方城县| 嵊泗县| 英超| 江都市| 晋州市| 西和县| 新邵县| 图们市| 静海县| 吉林市| 贺兰县| 郸城县| 怀化市| 长泰县| 云南省| 沧源| 滨海县| 永顺县| 沁源县| 连云港市| 岳西县| 江源县|