-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile.in
More file actions
112 lines (83 loc) · 4.18 KB
/
Makefile.in
File metadata and controls
112 lines (83 loc) · 4.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Unix
CC=@CC@
CFLAGS_EXTRA_DEFS=@HAVE_KERNEL_USB_DEVICE@ @HAVE_LIBUSB@ @HAVE_KERNEL_1284@ @HAVE_LIBIEEE1284@ @HAVE_NULLTRANS@
CFLAGS= $(CFLAGS_EXTRA_DEFS) -g -O2 -Wall -ansi -pedantic -Wmissing-prototypes
LDPATH=@LIBUSB_EXTRA_LDPATH@ @LIBIEEE1284_EXTRA_LDPATH@
LDLIBS=@LIBUSB_EXTRA_LDLIBS@ @LIBIEEE1284_EXTRA_LDLIBS@ @SOLARIS_EXTRA_LDLIBS@
EXTRA_DEPS=@LIBUSB_EXTRA_DEPS@ @LIBIEEE1284_EXTRA_DEPS@
EXTRA_BINS=@LIBUSB_EXTRA_BINS@ @LIBIEEE1284_EXTRA_BINS@
EXTRA_OBJS=@KUSB_EXTRA_OBJS@ @LIBUSB_EXTRA_OBJS@ @LIBIEEE1284_EXTRA_OBJS@ @BID_EXTRA_OBJS@ @NULLTRANS_EXTRA_OBJS@
OBJ=.@OBJEXT@
EXE=@EXEEXT@
# todo: this needs to be .dylib on OS X - write a test
SHARED_LDFLAGS=-shared
SHARED_OBJ=.so
#SHARED_LDFLAGS=-dylib
#SHARED_OBJ=.dylib
FE=-o
IJS_EXEC_SERVER=ijs_exec_unix$(OBJ)
RM=rm -f
AR=ar
ARFLAGS=qc
RANLIB=@RANLIB@
# Installation paths
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
includedir=@includedir@
pkgincludedir=$(includedir)/ijs
INSTALL = @INSTALL@
IJS_COMMON_OBJ=ijs$(OBJ)
all: ijs_server_epsonepl$(EXE) $(EXTRA_BINS)
LIB_OBJS=ijs$(OBJ) ijs_client$(OBJ) ijs_server$(OBJ) $(IJS_EXEC_SERVER)
EPL_BID_OBJS=epl_write$(OBJ) epl_bid_utils$(OBJ) epl_bid_replies$(OBJ) epl_status$(OBJ) epl_time$(OBJ)
EPL_OBJS=epl_job_header$(OBJ) epl_page_header$(OBJ) epl_page_footer$(OBJ) \
epl_job_footer$(OBJ) epl_print_stripe$(OBJ) epl_poll$(OBJ) epl_compress$(OBJ) \
$(EPL_BID_OBJS) $(EXTRA_OBJS)
EPL_HEADERS=epl_bid.h epl_compress.h epl_config.h epl_job.h epl_time.h
libijs.a: $(LIB_OBJS)
rm -f $@
$(AR) $(ARFLAGS) $@ $^
$(RANLIB) $@
# Note: this builds both the server and client into a single library. Logically, it
# makes sense to separate them, but they're small enough to make this probably
# not worthwhile.
libijs$(SHARED_OBJ): $(LIB_OBJS)
$(CC) $(SHARED_LDFLAGS) $^ -o $@
ijs_client_example$(EXE): ijs_client_example$(OBJ) ijs_client$(OBJ) $(IJS_COMMON_OBJ) $(IJS_EXEC_SERVER)
$(CC) $(CFLAGS) $(FE)ijs_client_example$(EXE) ijs_client_example$(OBJ) ijs_client$(OBJ) $(IJS_COMMON_OBJ) $(IJS_EXEC_SERVER)
ijs_server_example$(EXE): ijs_server_example$(OBJ) ijs_server$(OBJ) $(IJS_COMMON_OBJ)
$(CC) $(CFLAGS) $(FE)ijs_server_example$(EXE) ijs_server_example$(OBJ) ijs_server$(OBJ) $(IJS_COMMON_OBJ)
ijs_server_epsonepl$(EXE): ijs_server_epsonepl$(OBJ) ijs_server$(OBJ) $(IJS_COMMON_OBJ) $(EPL_OBJS) $(EXTRA_DEPS) $(EPL_HEADERS)
$(CC) $(CFLAGS) $(FE)ijs_server_epsonepl$(EXE) ijs_server_epsonepl$(OBJ) ijs_server$(OBJ) $(EPL_OBJS) $(IJS_COMMON_OBJ) $(LDPATH) $(LDLIBS)
testlibusb$(OBJ): libusb/tests/testlibusb.c
$(CC) $(CFLAGS) -c -I./libusb -o testlibusb$(OBJ) libusb/tests/testlibusb.c
testlibusb$(EXE): testlibusb$(OBJ) libusb/.libs/libusb.a
$(CC) $(CFLAGS) $(FE)testlibusb$(EXE) testlibusb$(OBJ) $(LDPATH) $(LDLIBS)
#test5700lusb doesn't need a .o.c target as the source is in the same directory.
test5700lusb$(EXE): test5700lusb$(OBJ) libusb/.libs/libusb.a
$(CC) $(CFLAGS) $(FE)test5700lusb$(EXE) test5700lusb$(OBJ) $(LDPATH) $(LDLIBS)
# libusb.spec is a generated file that interfers with rpm building. Therefore removing as soon as possible
libusb/.libs/libusb.a:
(cd libusb ; ./autogen.sh ; ./configure --disable-shared --disable-build-docs; make)
$(RM) libusb/libusb.spec
# libieee1284.spec is a generated file that interfers with rpm building. Therefore removing as soon as possible
libieee1284/.libs/libieee1284.a:
(cd libieee1284 ; ./autogen.sh ; ./configure --disable-shared ; make)
$(RM) libieee1284/libieee1284.spec
common_clean:
$(RM) *$(OBJ) ijs_client_example$(EXE) ijs_server_example$(EXE) ijs_server_epsonepl$(EXE) *.epl
clean: common_clean
$(RM) *~ gmon.out core ijs_spec.log ijs_spec.tex ijs_spec.aux libijs.a libijs$(SHARED_OBJ) config.cache config.log config.status ijs-config testlibusb$(EXE) test5700lusb$(EXE) libieee1284/lib1284.spec
[ -d libusb ] && (cd libusb ; make clean) || true
[ -d libieee1284 ] && (cd libieee1284 ; make clean) || true
install: all
$(INSTALL) ijs_server_epsonepl$(EXE) -c $(bindir)/ijs_server_epsonepl$(EXE)
uninstall:
$(RM) $(bindir)/ijs_server_epsonepl$(EXE)
ijs_spec.ps: ijs_spec.sgml
# We don't use db2pdf because it can't handle embedded .eps
db2ps ijs_spec.sgml
ijs_spec.pdf: ijs_spec.ps
ps2pdf ijs_spec.ps