Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -c<*.o name> <compilation flags>
- # -I<search path to include files>
- # -L<search path to the lib file>
- # -l<libname>
- CC =gcc
- CFLAGS =-Wall
- INCLUDE=-I ./include
- LIB =-L ./lib
- LFLAGS =$(LIB) -lopengl32 -lglu32 -lgdi32 -luser32 -lkernel32
- # trigger the "main" task with just Mingw32-make or just make
- all: main
- main: main.c
- $(CC) $^ -o $@ $(CFLAGS) $(INCLUDE) $(LFLAGS)
- # $^ is dependency list and $@ is action name
- # %.o means any *.o something is depending, same %.c and %.h are asigned automatically if have the same name
- %.o: %.c %.h
- $(CC) -c $^ $(CFLAGS)
- clean :
- del *.o
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement