makefileをつくって、$make -r エンターでエラーがでます。
どうしてでしょうか。makefileです。
エラーは
naka@naka ~/sample
$ make -r
gcc -c dbg_malloc.c -o -Wall
gcc -c dbg_malloc_sub.c -o -Wall
gcc -c dbg_malloc_print.c -o -Wall
ar ruc libdbg_malloc.a dbg_malloc.o dbg_malloc_sub.o dbg_malloc_print.o
C:\MinGW\bin\ar.exe: dbg_malloc.o: No such file or directory
make: *** [libdbg_malloc.a] Error 1
ファイルは同じフォルダに入っています。
よろしくお願いいたします。
コード OBJS =dbg_malloc.o dbg_malloc_sub.o dbg_malloc_print.o TARGET ?= libdbg_malloc.a CC = gcc AR ?= ar CFLAGS += -o CFLAGS += -Wall .SUFFIXES: .c .o all : $(TARGET) $(TARGET): $(OBJS) $(AR) ruc $(TARGET) $(OBJS) .c.o: $*.c $(CC) -c $*.c $(CFLAGS) clean : rm -f $(OBJS) $(TARGET)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/03/24 23:50
2018/03/24 23:57
退会済みユーザー
2018/03/25 00:16
2018/03/25 00:35 編集
退会済みユーザー
2018/03/25 01:32
2018/03/25 01:39
退会済みユーザー
2018/03/25 01:49
2018/03/25 01:56
退会済みユーザー
2018/03/25 02:28
2018/03/25 04:10