この GNU makefile は Windows でどのように見えますか (nmake と CL を使用する必要があります):
CC = gcc
CFLAGS = -Wall -Wextra -g
build: main
main: utils.o bucket.o hashset.o main.o
utils.o: utils.c utils.h
bucket.o: bucket.c bucket.h
hashset.o: hashset.c hashset.h
main.o: main.c
.PHONY:
clean:
rm -f *.o *~ main
私が思いついたのはこれだけでした:
CPP = cl
CFLAGS = /nologo /W4 /EHsc /Za
build : main
main: utils.obj bucket.obj hashset.obj main.obj
$(CPP) $(CFLAGS) /Fe$@ $**
utils.obj: utils.c
$(CPP) $(CFLAGS) /Fo$@ $**
bucket.obj: bucket.c
$(CPP) $(CFLAGS) /Fo$@ $**
hashset.obj: hashset.c
$(CPP) $(CFLAGS) /Fo$@ $**
main.obj: main.c
$(CPP) $(CFLAGS) /Fo$@ $**
clean:
del *.obj main
私の宿題はハッシュセットを実装していたことに注意してください。すべてのファイルでエラーが発生し続けます:予期しないファイルの終わり