当前位置:网站首页>General makefile (I) single C language compilation template
General makefile (I) single C language compilation template
2022-07-05 08:00:00 【Drink more hot water-】
[email protected] Represents the target file
$^ Represents all dependent files
$< Represents the first dependent file
$? Represents a list of dependent files that are newer than the target
A single C Language compilation :
#set a name as compile target
TARGET=main
CC=gcc
CFLAGS= -c -Wall
LDFLAGS=
SRCS=$(wildcard *.c)
OBJS=$(patsubst %.c,%.o,$(SRCS))
.PHONY: clean
all: $(TARGET)
$(TARGET): $(OBJS)
$(CC) $^ $(LDFLAGS) -o [email protected]
$(OBJS):%.o:%.c
$(CC) $(CFLAGS) $< -o [email protected]
clean:
rm -f $(OBJS) $(TARGET)
边栏推荐
- Gradle composite construction
- Scm-05 basis of independent keyboard
- Threads and processes
- Detailed explanation of pragma usage
- Global and Chinese market of plastic recycling machines 2022-2028: Research Report on technology, participants, trends, market size and share
- Record the visual shock of the Winter Olympics and the introduction of the screen 2
- Global and Chinese market for blood typing 2022-2028: Research Report on technology, participants, trends, market size and share
- Create inf module in AMI code
- Distinction between heap and stack
- A simple method to prove 1/t Fourier transform
猜你喜欢

Altium designer 19.1.18 - clear information generated by measuring distance

Consul安装

Create inf module in AMI code

Altium Designer 19.1.18 - 清除测量距离产生的信息

Cadence simulation encountered "input.scs": can not open input file change path problem

C # joint configuration with Halcon

Record the opening ceremony of Beijing Winter Olympics with display equipment

Altium designer 19.1.18 - Import frame

High end electronic chips help upgrade traditional oil particle monitoring

MySQL blind note common functions
随机推荐
Consul安装
L'étude a révélé que le système de service à la clientèle du commerce électronique transfrontalier a ces cinq fonctions!
Scm-05 basis of independent keyboard
Realization of binary relation of discrete mathematics with C language and its properties
C WinForm [get file path -- traverse folder pictures] - practical exercise 6
High end electronic chips help upgrade traditional oil particle monitoring
Record the torch encountered by win10 cuda. is_ False problem in available()
找不到实时聊天软件?给你推荐电商企业都在用的!
C WinForm [help interface - send email] - practice five
PMSM dead time compensation
研究发现,跨境电商客服系统都有这五点功能!
Extern keyword function
Programming knowledge -- basis of C language
Altium Designer 19.1.18 - 清除测量距离产生的信息
Measurement fitting based on Halcon learning [i] fuse Hdev routine
C#,数值计算(Numerical Recipes in C#),线性代数方程的求解,LU分解(LU Decomposition)源程序
Shape template matching based on Halcon learning [9] PM_ multiple_ dxf_ models. Hdev routine -- [read and write XLD from DXF file]
[professional literacy] core conferences and periodicals in the field of integrated circuits
Relationship between line voltage and phase voltage, line current and phase current
[untitled] record the visual shock of the Winter Olympics and the introduction of the display screen