You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.0 KiB

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
OBJOPT = -Wall -c `sdl-config --cflags`
SUBDIRS = glgui glmenu
SUBDIROBJECTS = glgui/*.o glmenu/*.o
VERSION = 0.0.1
LIBNAME = libsegl
seglar: $(OBJECTS) subdirs
@echo OBJOPT $(OBJOPT)
@echo CC $(CC)
rm -f $(LIBNAME).a
$(AR) rcs $(LIBNAME).a $(OBJECTS) $(SUBDIROBJECTS)
# ranlib $(LIBNAME).a
segllib: $(OBJECTS) subdirs
subdirs:
@for i in $(SUBDIRS); do $(MAKE) CC="$(CC)" OBJOPT="$(OBJOPT)" -C $$i; done
%.o: %.cpp %.h
$(CC) $(OBJOPT) $<
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
cleansubdirs:
@for i in $(SUBDIRS); do $(MAKE) clean -C $$i; done
clean: cleansubdirs
rm -f $(OBJECTS)
# cd glgui; $(MAKE) clean
# cd glmenu; $(MAKE) clean
@echo Done cleaning...