1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

5秒でビルド

Last updated at Posted at 2013-05-18

サンプルプログラムを書いて速攻ビルドして動作確認したいってときに
Makefileの書き方なんて直ぐに忘れてしまうのでメモ。

同一ディレクトリにソース置いてある環境を想定

./temp
main.c
sub.c
sub.h
Makefile

TARGETS=main
main: main.o sub.o
CFLAGS += -Wall -g  -Wextra
LDFLAGS += 
all: $(TARGETS)

.PHONY: clean
clean:
	$(RM) *.o $(TARGETS)

windowsでcygwinのときはcleanは*.exe
C++ならCXXFLAGS

1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?