libsegl/Makefile

40 lines
1011 B
Makefile
Raw Normal View History

2008-03-31 00:14:35 +02:00
CC = g++
AR = ar
OBJECTS = punkt3d.o punkt2d.o emath.o emath_opengl.o glcolor.o gldrawhelper.o glfontengine.o glrect.o gltexture.o matrix.o quaternion.o rotationsmatrix.o glsdlscreen.o sdlfuncs.o fpsmanager.o
2008-03-31 00:14:35 +02:00
OBJOPT = -Wall -c `sdl-config --cflags`
SUBDIRS = glgui glmenu
SUBDIROBJECTS = glgui/*.o glmenu/*.o
2008-02-09 13:43:23 +01:00
VERSION = 0.0.1
LIBNAME = libsegl
2008-02-09 13:43:23 +01:00
seglar: $(OBJECTS) subdirs
rm -f $(LIBNAME).a
2008-03-31 00:14:35 +02:00
$(AR) rcs $(LIBNAME).a $(OBJECTS) $(SUBDIROBJECTS)
# ranlib $(LIBNAME).a
segllib: $(OBJECTS) subdirs
subdirs:
2008-03-31 18:48:58 +02:00
@for i in $(SUBDIRS); do $(MAKE) CC="$(CC)" AR="$(AR)" OBJOPT="$(OBJOPT)" -C $$i; done
2008-02-09 13:43:23 +01:00
%.o: %.cpp %.h
2008-03-31 00:14:35 +02:00
$(CC) $(OBJOPT) $<
2008-02-09 13:43:23 +01:00
glgui/glgui.a:
cd glgui; $(MAKE);
glmenu/glmenu.a:
cd glmenu; $(MAKE);
testprog: seglar testprog.o
g++ `sdl-config --libs` -lSDL_image -lGL -lGLU testprog.o -o testprog $(LIBNAME).a
2008-03-31 00:14:35 +02:00
cleansubdirs:
@for i in $(SUBDIRS); do $(MAKE) clean -C $$i; done
clean: cleansubdirs
2008-02-09 13:43:23 +01:00
rm -f $(OBJECTS)
2008-03-31 00:14:35 +02:00
# cd glgui; $(MAKE) clean
# cd glmenu; $(MAKE) clean
2008-02-09 13:43:23 +01:00
@echo Done cleaning...