Compiling on Linux

Example 1

all:
    gcc `sdl-config --cflags` `sdl-config--libs` -osdltest sdltest

Example 2

all:
    gcc -c `sdl-config --cflags` sdltest1.c sdltest1.o
    gcc -c `sdl-config --cflags` sdltest2.c sdltest2.o
    gcc `sdl-config--libs` sdltest1.o sdltest2.o -osdltest

Note: Makefiles should use tabs instead of spaces unlike here.

FAQ_CompilingLinux (last edited 2008-04-17 08:18:50 by localhost)