このジェネリック makefileを使用しています。
このカスタムオプションで:
# The pre-processor options used by the cpp (man cpp for more).
CPPFLAGS = -Wall -I/Library/Frameworks/SDL.framework/Headers
# The options used in linking as well as in any direct use of ld.
LDFLAGS = -framework SDL -framework Cocoa -framework OpenGL
# The executable file name.
# If not specified, current directory name or `a.out' will be used.
PROGRAM = app
# The source file types (headers excluded).
# .c indicates C source files, and others C++ ones.
SRCEXTS = .c .C .cc .cpp .CPP .c++ .cxx .cp .m
clean:
$(RM) $(OBJS) $(PROGRAM) $(PROGRAM)
それ以外の:
# The pre-processor options used by the cpp (man cpp for more).
CPPFLAGS = -Wall
# The options used in linking as well as in any direct use of ld.
LDFLAGS =
# The executable file name.
# If not specified, current directory name or `a.out' will be used.
PROGRAM =
# The source file types (headers excluded).
# .c indicates C source files, and others C++ ones.
SRCEXTS = .c .C .cc .cpp .CPP .c++ .cxx .cp
clean:
$(RM) $(OBJS) $(PROGRAM) $(PROGRAM).exe
ここに、私が実行しているメイクファイルの完全なバージョンがあります。
Mac OS X 10.6.8 と gcc 4.2.1 を使用しており、SDL と OpenGL を使用しmain.cpp
てコンパイルしようとしています。SDLMain.m
SDLMain.h
ポップアップするエラーは次のとおりです。
main.d:1: *セパレーターがありません。止まる。
ファイル main.d (makefile によって生成される) は次のとおりです。
-n ./
main.o: main.cpp
どうしたの?