summaryrefslogtreecommitdiff
path: root/sdk/recipes/patches/libmng/makefile.unix.p
blob: 46c2cb7e595328598462d8e24788aed3c02f584c (plain)
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
--- makefiles/makefile.unix.org	2007-12-26 16:20:25.000000000 +0100
+++ makefiles/makefile.unix	2007-12-26 16:18:02.000000000 +0100
@@ -7,20 +7,24 @@
 # Configuration options are now in libmng_conf.h
 
 # The name of your C compiler:
-CC= cc
+CC= $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
+AR= $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*ar)
+
+# where "make install" puts libmng.a,libmng.so*,libmng.h,libmng_conf.h,libmng_types.h
+prefix=$(GCCSDK_INSTALL_ENV)
 
 # Location of jpeg header files
-JPEG_INC= /cs/include/jpeg
+JPEG_INC= $(prefix)/include
 
 # Location of zlib header files
-ZLIB_INC= /cs/include
+ZLIB_INC= $(prefix)/include
 
 # Location of lcms header files
 # (switch on MNG_FULL_CMS in libmng_conf.h if you want to use this)
-LCMS_INC= /ltmp/lcms-1.06/source
+LCMS_INC= $(prefix)/include
 
 # compiler options:
-CFLAGS= -O -I. -I$(ZLIB_INC) -I$(JPEG_INC) -I$(LCMS_INC)
+CFLAGS= -O3 -I. -I$(ZLIB_INC) -I$(JPEG_INC) -I$(LCMS_INC)
 
 # source files
 SOURCES= \
@@ -59,7 +63,16 @@
 	/bin/rm -f *~ core
 
 libmng.a: $(OBJECTS)
-	ar r libmng.a $(OBJECTS)
+	$(AR) r libmng.a $(OBJECTS)
+
+INCPATH=$(prefix)/include
+LIBPATH=$(prefix)/lib
+
+install: libmng.a 
+	-@mkdir -p $(INCPATH) $(LIBPATH)
+	cp libmng.h libmng_conf.h libmng_types.h $(INCPATH)
+	chmod 644 $(INCPATH)/libmng.h $(INCPATH)/libmng_conf.h $(INCPATH)/libmng_types.h
+	cp libmng.a $(LIBPATH)
 
 depend:
 	makedepend -- $(CFLAGS) $(IFLAGS) -- *.c