rendlib/Makefile

25 lines
603 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)
$(CC) $(CFLAGS) -c camera.c -o $(OUT)/camera.o $(LFLAGS)
$(LD) -relocatable $(OUT)/rendlib.o $(OUT)/math.o $(OUT)/object.o $(OUT)/camera.o -o $(OUT)/rendlib
dev: all
$(CC) $(CFLAGS) dev.c $(OUT)/rendlib -o $(OUT)/dev $(LFLAGS)
devall: dev
$(OUT)/dev
clean:
rm -rf $(OUT)