ysyx-workbench/am-kernels/kernels/bad-apple/Makefile
tracer-ysyx d08c2860da > compile NEMU
ysyx_22040000 李心杨
Linux calcite 6.6.19 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar  1 12:35:11 UTC 2024 x86_64 GNU/Linux
 16:26:21  up 4 days  3:32,  2 users,  load average: 0.85, 0.91, 0.95
2024-03-24 16:26:21 +08:00

23 lines
693 B
Makefile

VIDEO_ROW = 25
VIDEO_COL = 80
AUDIO_FREQ = 44100
AUDIO_CHANNEL = 1
VIDEO_SRC = bad-apple.mp4
VIDEO = build/video.frame
AUDIO = build/audio.pcm
NAME = bad-apple
SRCS = bad-apple.c resources.S
include $(AM_HOME)/Makefile
CFLAGS += -DVIDEO_ROW=$(VIDEO_ROW) -DVIDEO_COL=$(VIDEO_COL) \
-DAUDIO_FREQ=$(AUDIO_FREQ) -DAUDIO_CHANNEL=$(AUDIO_CHANNEL)
ASFLAGS += -DVIDEO_FILE=\"$(abspath $(VIDEO))\" -DAUDIO_FILE=\"$(abspath $(AUDIO))\"
$(VIDEO):
ffmpeg -i $(VIDEO_SRC) -f image2pipe -s $(VIDEO_COL)x$(VIDEO_ROW) -vcodec rawvideo -pix_fmt monow $@
$(AUDIO):
ffmpeg -i $(VIDEO_SRC) -vn -acodec pcm_s16le -f s16le -ac $(AUDIO_CHANNEL) -ar $(AUDIO_FREQ) $@
resources.S: $(VIDEO) $(AUDIO)