mirror of
https://github.com/leozide/leocad
synced 2025-01-29 20:34:50 +01:00
Fixes to compile on FreeBSD.
This commit is contained in:
parent
1a29356179
commit
5bfa04ddf1
2 changed files with 12 additions and 5 deletions
|
@ -16,5 +16,5 @@ ifeq ($(HAVE_PNGLIB), yes)
|
||||||
SRC += common/im_png.cpp
|
SRC += common/im_png.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LIBS += -lm -lz -lX11 -ldl
|
LIBS += -lm -lz -lX11 $(EXTRALIBS)
|
||||||
|
|
||||||
|
|
15
config.mk
15
config.mk
|
@ -12,15 +12,22 @@ OSDIR := linux
|
||||||
# (Add a -g for debugging)
|
# (Add a -g for debugging)
|
||||||
CPPFLAGS += -O2 -Wall
|
CPPFLAGS += -O2 -Wall
|
||||||
|
|
||||||
|
UNAME_S := $(shell uname -s)
|
||||||
|
|
||||||
### FreeBSD configuration
|
### FreeBSD configuration
|
||||||
|
|
||||||
ifeq ($(shell uname), FreeBSD)
|
ifeq ($(UNAME_S), FreeBSD)
|
||||||
CPPFLAGS += -L/usr/local/lib
|
CPPFLAGS += -L /usr/local/lib
|
||||||
|
LDFLAGS += -I /usr/local/include
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(UNAME_S),Linux)
|
||||||
|
EXTRALIBS += -ldl
|
||||||
endif
|
endif
|
||||||
|
|
||||||
### Default directory
|
### Default directory
|
||||||
|
|
||||||
ifeq ($(PREFIX), )
|
ifeq ($(PREFIX),)
|
||||||
PREFIX := /usr/local
|
PREFIX := /usr/local
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -39,7 +46,7 @@ CONFTEST="\#include <stdio.h>\nint main() { FILE *f=fopen(\"conftestval\", \"w\"
|
||||||
if (!f) return 1; fprintf(f, \"%%d\\\n\", (int)sizeof(%s)); return 0; }\n"
|
if (!f) return 1; fprintf(f, \"%%d\\\n\", (int)sizeof(%s)); return 0; }\n"
|
||||||
|
|
||||||
$(OSDIR)/config.mk: config.mk
|
$(OSDIR)/config.mk: config.mk
|
||||||
make config
|
$(MAKE) config
|
||||||
|
|
||||||
config:
|
config:
|
||||||
@echo "Automatic configuration"
|
@echo "Automatic configuration"
|
||||||
|
|
Loading…
Add table
Reference in a new issue