makefile

来自「乒乓球游戏程序」· 代码 · 共 59 行

TXT
59
字号
#########################################
#                                       #
#           Makefile for Pong           #
#                                       #
#    (c) Copyright George Foot, 1998    #
#                                       #
#########################################


# Variables to control internal rules:

CC = gcc
CFLAGS = -O2 -Wall -Werror -g
TARGET_ARCH = -m486
LDLIBS = -lalleg


# Variables:

SRCS = global.c main.c game.c input.c display.c objects.c bat.c ball.c
OBJS = $(patsubst %.c,%.o,$(SRCS))
EXE = pong.exe


# Phony targets:

.PHONY: all clean deps


# All:

all: $(EXE)


# How to make the executable:

$(EXE): $(OBJS)
	$(LINK.o) $^ $(LDLIBS) $(LOADLIBES) -o $@


# How to make the object files:

-include deps.mak

# (deps.mak is generated by `make deps' as below)


# Dependencies:

deps:
	gcc -MM $(SRCS) > deps.mak


# Cleaning target (only works with fileutils):

clean:
	rm -f $(OBJS) $(EXE)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?