mirror of
https://github.com/leozide/leocad
synced 2025-01-17 18:11:42 +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
|
||||
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)
|
||||
CPPFLAGS += -O2 -Wall
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
### FreeBSD configuration
|
||||
|
||||
ifeq ($(shell uname), FreeBSD)
|
||||
CPPFLAGS += -L/usr/local/lib
|
||||
ifeq ($(UNAME_S), FreeBSD)
|
||||
CPPFLAGS += -L /usr/local/lib
|
||||
LDFLAGS += -I /usr/local/include
|
||||
endif
|
||||
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
EXTRALIBS += -ldl
|
||||
endif
|
||||
|
||||
### Default directory
|
||||
|
||||
ifeq ($(PREFIX), )
|
||||
ifeq ($(PREFIX),)
|
||||
PREFIX := /usr/local
|
||||
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"
|
||||
|
||||
$(OSDIR)/config.mk: config.mk
|
||||
make config
|
||||
$(MAKE) config
|
||||
|
||||
config:
|
||||
@echo "Automatic configuration"
|
||||
|
|
Loading…
Reference in a new issue