当前位置:网站首页>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)
边栏推荐
- Shell script basic syntax
- Altium designer 19.1.18 - change the transparency of copper laying
- C # joint configuration with Halcon
- Halcon's practice based on shape template matching [2]
- Ads learning record (lna_atf54143)
- Define in and define out
- The firmware of the connected j-link does not support the following memory access
- C WinForm [change the position of the form after running] - Practical Exercise 4
- [popular science] some interesting things that I don't know whether they are useful or not
- Count and sort the occurrence times of specific fields through SQL statements
猜你喜欢
Class of color image processing based on Halcon learning_ ndim_ norm. hdev
如何将EasyCVR平台RTSP接入的设备数据迁移到EasyNVR中?
L'étude a révélé que le système de service à la clientèle du commerce électronique transfrontalier a ces cinq fonctions!
Shell脚本基本语法
Altium Designer 19.1.18 - 导入板框
mysql 盲注常见函数
Programming knowledge -- basis of C language
Altium Designer 19.1.18 - 清除测量距离产生的信息
生产中影响滑环质量的因素
The firmware of the connected j-link does not support the following memory access
随机推荐
Shell脚本基本语法
Global and Chinese markets for anesthesia, breathing and sleep apnea devices 2022-2028: Research Report on technology, participants, trends, market size and share
Consul安装
Volatile of C language
Altium designer 19.1.18 - clear information generated by measuring distance
研究发现,跨境电商客服系统都有这五点功能!
UEFI development learning 2 - running ovmf in QEMU
IC software learning
Application of ultra pure water particle counter in electronic semiconductors
Basic embedded concepts
Shape template matching based on Halcon learning [9] PM_ multiple_ dxf_ models. Hdev routine -- [read and write XLD from DXF file]
Shape template matching based on Halcon learning [VII] reuse_ model. Hdev routine
Halcon's practice based on shape template matching [2]
Random function usage notes
UEFI development learning 4 - getting to know variable services
Hardware 3 -- function of voltage follower
[professional literacy] specific direction of analog integrated circuits
软件设计师:03-数据库系统
Shape template matching based on Halcon learning [viii] PM_ multiple_ models. Hdev routine
. Net service governance flow limiting middleware -fireflysoft RateLimit