Customers Empty

プログラミングに関するメモ

make

新着順 人気順

Makefile : ヘッダファイルの更新を考慮する

1つのCソースファイルから1つの実行ファイルを作る ただしヘッダファイルの更新も考慮する ※ヘッダファイル中のヘッダファイルの変更などに対応なし C=gcc #CC=i686-w64-mingw32-gcc CFLAGS=-O2 -g -lm SRC=$(wildcard *.c) TARGET=$(basename $(SRC)) DEP=$…

Makefile : 1つのCソースファイルから1つの実行ファイルを作る

1つのCソースファイルから1つの実行ファイルを作る そんなMakefile CC=gcc CFLAG=-g -Wall SRC=$(wildcard *.c) TARGET=$(basename $(SRC)) all: $(TARGET) $(TARGET):%:%.c $(CC) $(CFLAG) -o $@ $^ #static pattern rule #targets... : target-pattern : d…