欢迎光临散文网 会员登陆 & 注册

Minimal Makefile

2023-03-10 15:02 作者:小粉丝8  | 我要投稿

# 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

# target name is basename of one of the source files

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

-include *.d

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

.PHONY : clean


Minimal Makefile的评论 (共 条)

分享到微博请遵守国家法律