summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
-rw-r--r--common/module.mk7
-rw-r--r--linux/module.mk6
3 files changed, 12 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 96f50f6..7705233 100644
--- a/Makefile
+++ b/Makefile
@@ -29,13 +29,18 @@ OBJ := \
### link the program
-.PHONY: all
+.PHONY: all static
all: $(BIN)
+static: bin/leocad.static
+
bin/leocad: $(OBJ) bin
$(CC) -o $@ $(OBJ) $(LIBS)
+bin/leocad.static: $(OBJ) bin
+ $(CC) -static -o $@ $(OBJ) $(LIBS)
+
bin:
mkdir bin
diff --git a/common/module.mk b/common/module.mk
index 39db3b8..3783f84 100644
--- a/common/module.mk
+++ b/common/module.mk
@@ -1,6 +1,5 @@
SRC += common/boundbox.cpp common/camera.cpp common/file.cpp common/globals.cpp common/group.cpp common/image.cpp common/im_png.cpp common/light.cpp common/matrix.cpp common/piece.cpp common/pieceinf.cpp common/project.cpp common/quant.cpp common/terrain.cpp common/texture.cpp common/tr.cpp common/vector.cpp
-LIBS += -lGLU -lGL -ljpeg -lpng
-
-
-
+#LIBS += -lGLU -lGL -ljpeg -lpng -lm -lX11
+# Work around for debian bug in mesag-dev
+LIBS += -lMesaGLU -lMesaGL -ljpeg -lpng -lz -lm -lX11
diff --git a/linux/module.mk b/linux/module.mk
index 40af84a..534ed46 100644
--- a/linux/module.mk
+++ b/linux/module.mk
@@ -1,6 +1,6 @@
SRC += linux/custom.cpp linux/gdkgl.c linux/gtkglarea.c linux/dialogs.cpp linux/gtktools.cpp linux/main.cpp linux/menu.cpp linux/system.cpp linux/toolbar.cpp
-CFLAGS += `gtk-config --cflags`
-CXXFLAGS += `gtk-config --cflags`
-LIBS += `gtk-config --libs`
+CFLAGS += $(shell gtk-config --cflags)
+CXXFLAGS += $(shell gtk-config --cflags)
+LIBS += $(shell gtk-config --libs)