24 lines
529 B
Makefile
24 lines
529 B
Makefile
|
CC=gcc
|
||
|
CFLAGS=-DFREEGLUT_STATIC -g3
|
||
|
LFLAGS=-lglfw -L/usr/lib64 -lGLEW -lGL -lX11 -lGLU -lassimp -lm
|
||
|
LD=ld
|
||
|
OUT=build
|
||
|
DEV=dev.c
|
||
|
|
||
|
all:
|
||
|
mkdir -p $(OUT)
|
||
|
$(CC) $(CFLAGS) -c rendlib.c -o $(OUT)/rendlib.o $(LFLAGS)
|
||
|
$(CC) $(CFLAGS) -c math.c -o $(OUT)/math.o $(LFLAGS)
|
||
|
$(CC) $(CFLAGS) -c object.c -o $(OUT)/object.o $(LFLAGS)
|
||
|
$(LD) -relocatable $(OUT)/rendlib.o $(OUT)/math.o $(OUT)/object.o -o $(OUT)/rendlib
|
||
|
|
||
|
dev: all
|
||
|
$(CC) $(CFLAGS) dev.c $(OUT)/rendlib -o $(OUT)/dev $(LFLAGS)
|
||
|
|
||
|
devall: dev
|
||
|
$(OUT)/dev
|
||
|
|
||
|
|
||
|
clean:
|
||
|
rm -rf $(OUT)
|