Skip to content

Instantly share code, notes, and snippets.

@Mine02C4
Last active October 9, 2015 21:48
Show Gist options
  • Save Mine02C4/7d3a0d9f0add4508463f to your computer and use it in GitHub Desktop.
Save Mine02C4/7d3a0d9f0add4508463f to your computer and use it in GitHub Desktop.
プログラミング第3同演習向けMakefile 直下にある .c ファイルをそれぞれ .out の名前の実行ファイルにコンパイル(まぁ単純だしどこでも使えるよね)
CC = gcc
CFLAGS = -O0
OUTPUTS := $(patsubst %.c,%.out,$(wildcard *.c))
.PHONY : all clean
all : $(OUTPUTS)
clean :
rm *.out
%.out : %.c
$(CC) $< -o $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment