1
# ``The contents of this file are subject to the Erlang Public License,
2
# Version 1.1, (the "License"); you may not use this file except in
3
# compliance with the License. You should have received a copy of the
4
# Erlang Public License along with this software. If not, it can be
5
# retrieved via the world wide web at http://www.erlang.org/.
7
# Software distributed under the License is distributed on an "AS IS"
8
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
9
# the License for the specific language governing rights and limitations
12
# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
13
# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
14
# AB. All Rights Reserved.''
18
include $(ERL_TOP)/make/target.mk
19
include $(ERL_TOP)/make/$(TARGET)/otp.mk
21
# ----------------------------------------------------
23
# ----------------------------------------------------
27
# ----------------------------------------------------
28
# The following variables differ on different systems, we set
29
# reasonable defaults, if something different is needed it should
30
# be set for that system only.
31
# ----------------------------------------------------
37
LDFLAGS = @DED_LDFLAGS@
38
ERLANG_OSTYPE = @ERLANG_OSTYPE@
41
GD_INCLUDE= @GD_INCLUDE@
43
CC_R_FLAG = @DED_LD_FLAG_RUNTIME_LIBRARY_PATH@
44
GD_LINK_LIB=-L$(GD_LIBDIR) -lgd
45
CC_R_OPT = $(CC_R_FLAG)$(GD_LIBDIR)
47
SYSINCLUDE = -I$(ERL_TOP)/erts/emulator/beam \
48
-I$(ERL_TOP)/erts/emulator/sys/$(ERLANG_OSTYPE) \
49
-I$(ERL_TOP)/erts/include/internal \
50
-I$(ERL_TOP)/erts/include/internal/$(ERLANG_OSTYPE) \
51
-I$(ERL_TOP)/erts/include \
52
-I$(ERL_TOP)/erts/include/$(ERLANG_OSTYPE)
53
ifeq ($(findstring vxworks,$(TARGET)),vxworks)
54
SYSINCLUDE += -I$(ERL_TOP)/erts/etc/vxworks
57
EGD_DRV_INCLUDES = $(SYSINCLUDE)
59
ALL_CFLAGS = $(CFLAGS) @DEFS@ $(TYPE_FLAGS) $(EGD_DRV_INCLUDES)
64
TYPE_FLAGS = -g -DDEBUG @DEBUG_FLAGS@
70
ROOTDIR = $(ERL_TOP)/lib
72
LIBDIR = $(PRIVDIR)/lib/$(TARGET)
73
OBJDIR = $(PRIVDIR)/obj/$(TARGET)
75
# ----------------------------------------------------
76
# Release directory specification
77
# ----------------------------------------------------
78
RELSYSDIR = $(RELEASE_PATH)/lib/percept-$(VSN)
80
# ----------------------------------------------------
82
# ----------------------------------------------------
85
$(OBJDIR)/egd_port_driver.o \
86
$(OBJDIR)/egd_image.o \
87
$(OBJDIR)/egd_coding.o
90
ifeq ($(findstring win32,$(TARGET)), win32)
91
SOLIBS = $(LIBDIR)/egd_drv.dll
94
ifeq ($(findstring vxworks,$(TARGET)),vxworks)
95
SOLIBS = $(LIBDIR)/egd_drv.eld
97
SOLIBS = $(LIBDIR)/egd_drv.so
102
# ----------------------------------------------------
104
# ----------------------------------------------------
106
debug opt: $(OBJDIR) $(BINDIR) $(SOLIBS)
115
$(INSTALL_DIR) $(OBJDIR)
116
$(CC) -c -o $@ $(ALL_CFLAGS) $(GD_INCLUDE) $<
118
$(LIBDIR)/egd_drv.so: $(EGD_DRV_OBJS)
119
$(INSTALL_DIR) $(LIBDIR)
120
$(LD) $(CC_R_OPT) $(LDFLAGS) -o $@ $^ $(LIBS) $(GD_LINK_LIB)
122
$(LIBDIR)/egd_drv.dll: $(EGD_DRV_OBJS)
123
$(INSTALL_DIR) $(LIBDIR)
124
$(LD) $(CC_R_OPT) $(LDFLAGS) -o $@ $^ $(LIBS) $(GD_LINK_LIB)
126
# VxWorks is simply to different from Unix in this sense.
127
# Here are the inference rules for VxWorks
129
$(LIBDIR)/egd_drv.eld: $(EGD_DRV_OBJS)
130
$(INSTALL_DIR) $(LIBDIR)
131
$(LD) $(CC_R_OPT) $(LDFLAGS) -o $@ $^ $(LIBS) $(GD_LINK_LIB)
134
rm -f $(SOLIBS) $(EGD_DRV_OBJS) $(EGD_DRV_OBJS)
139
# ----------------------------------------------------
141
# ----------------------------------------------------
142
include $(ERL_TOP)/make/otp_release_targets.mk
145
$(INSTALL_DIR) $(RELSYSDIR)/priv/lib
146
$(INSTALL_PROGRAM) $(SOLIBS) $(RELSYSDIR)/priv/lib