Uwe Hermann | 7eb845e | 2008-11-02 17:01:06 +0000 | [diff] [blame] | 1 | ## |
| 2 | ## This file is part of the bayou project. |
| 3 | ## |
| 4 | ## Copyright (C) 2008 Advanced Micro Devices, Inc. |
| 5 | ## |
| 6 | ## This program is free software; you can redistribute it and/or modify |
| 7 | ## it under the terms of the GNU General Public License version 2 as |
| 8 | ## published by the Free Software Foundation. |
| 9 | ## |
| 10 | ## This program is distributed in the hope that it will be useful, |
| 11 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | ## GNU General Public License for more details. |
| 14 | ## |
| 15 | ## You should have received a copy of the GNU General Public License |
| 16 | ## along with this program; if not, write to the Free Software |
Paul Menzel | a46a712 | 2013-02-23 18:37:27 +0100 | [diff] [blame] | 17 | ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
Uwe Hermann | 7eb845e | 2008-11-02 17:01:06 +0000 | [diff] [blame] | 18 | ## |
| 19 | |
Uwe Hermann | 7eb845e | 2008-11-02 17:01:06 +0000 | [diff] [blame] | 20 | PBUILDOBJS := config.o create.o show.o main.o |
| 21 | INCLUDES := -Iliblar/ |
Stefan Reinauer | 7b76912 | 2010-04-20 23:04:46 +0000 | [diff] [blame] | 22 | HOSTCXX=g++ |
| 23 | HOSTCC=gcc |
| 24 | HOSTCFLAGS=-Wall -Werror -g |
Uwe Hermann | 7eb845e | 2008-11-02 17:01:06 +0000 | [diff] [blame] | 25 | |
Uwe Hermann | 54c5276 | 2008-11-02 17:48:20 +0000 | [diff] [blame] | 26 | all: pbuilder |
| 27 | |
| 28 | LZMA_OBJ := lzma/LZMAEncoder.o lzma/LZInWindow.o lzma/RangeCoderBit.o |
| 29 | LZMA_OBJ += lzma/StreamUtils.o lzma/OutBuffer.o lzma/Alloc.o lzma/CRC.o |
| 30 | LZMA_OBJ += lzma/lzma-compress.o |
| 31 | |
| 32 | lzma/lzma-compress.o: lzma/minilzma.cc |
Stefan Reinauer | 7b76912 | 2010-04-20 23:04:46 +0000 | [diff] [blame] | 33 | $(HOSTCXX) -o $@ -c -DCOMPACT $< |
Uwe Hermann | 54c5276 | 2008-11-02 17:48:20 +0000 | [diff] [blame] | 34 | |
| 35 | lzma/%.o: lzma/C/7zip/Compress/LZMA/%.cpp |
Stefan Reinauer | 7b76912 | 2010-04-20 23:04:46 +0000 | [diff] [blame] | 36 | $(HOSTCXX) -o $@ -c $< |
Uwe Hermann | 54c5276 | 2008-11-02 17:48:20 +0000 | [diff] [blame] | 37 | |
| 38 | lzma/%.o: lzma/C/7zip/Compress/LZ/%.cpp |
Stefan Reinauer | 7b76912 | 2010-04-20 23:04:46 +0000 | [diff] [blame] | 39 | $(HOSTCXX) -o $@ -c $< |
Uwe Hermann | 54c5276 | 2008-11-02 17:48:20 +0000 | [diff] [blame] | 40 | |
| 41 | lzma/%.o: lzma/C/7zip/Compress/RangeCoder/%.cpp |
Stefan Reinauer | 7b76912 | 2010-04-20 23:04:46 +0000 | [diff] [blame] | 42 | $(HOSTCXX) -o $@ -c $< |
Uwe Hermann | 54c5276 | 2008-11-02 17:48:20 +0000 | [diff] [blame] | 43 | |
| 44 | lzma/%.o: lzma/C/7zip/Decompress/%.cpp |
Stefan Reinauer | 7b76912 | 2010-04-20 23:04:46 +0000 | [diff] [blame] | 45 | $(HOSTCXX) -o $@ -c $< |
Uwe Hermann | 54c5276 | 2008-11-02 17:48:20 +0000 | [diff] [blame] | 46 | |
| 47 | lzma/%.o: lzma/C/7zip/Common/%.cpp |
Stefan Reinauer | 7b76912 | 2010-04-20 23:04:46 +0000 | [diff] [blame] | 48 | $(HOSTCXX) -o $@ -c $< |
Uwe Hermann | 54c5276 | 2008-11-02 17:48:20 +0000 | [diff] [blame] | 49 | |
| 50 | lzma/%.o: lzma/C/Common/%.cpp |
Stefan Reinauer | 7b76912 | 2010-04-20 23:04:46 +0000 | [diff] [blame] | 51 | $(HOSTCXX) -o $@ -c $< |
Uwe Hermann | 54c5276 | 2008-11-02 17:48:20 +0000 | [diff] [blame] | 52 | |
| 53 | lzma/%.o: lzma/%.cc |
Stefan Reinauer | 7b76912 | 2010-04-20 23:04:46 +0000 | [diff] [blame] | 54 | $(HOSTCXX) -o $@ -c $< |
Uwe Hermann | 54c5276 | 2008-11-02 17:48:20 +0000 | [diff] [blame] | 55 | |
Uwe Hermann | 7eb845e | 2008-11-02 17:01:06 +0000 | [diff] [blame] | 56 | pbuilder: $(PBUILDOBJS) $(LZMA_OBJ) liblar/liblar.a |
Stefan Reinauer | 7b76912 | 2010-04-20 23:04:46 +0000 | [diff] [blame] | 57 | $(HOSTCXX) -o $@ $(PBUILDOBJS) $(LZMA_OBJ) liblar/liblar.a -lexpat |
Uwe Hermann | 7eb845e | 2008-11-02 17:01:06 +0000 | [diff] [blame] | 58 | |
| 59 | liblar/liblar.a: |
Stefan Reinauer | 7b76912 | 2010-04-20 23:04:46 +0000 | [diff] [blame] | 60 | $(MAKE) -C liblar |
Uwe Hermann | 7eb845e | 2008-11-02 17:01:06 +0000 | [diff] [blame] | 61 | |
Uwe Hermann | 7eb845e | 2008-11-02 17:01:06 +0000 | [diff] [blame] | 62 | %.o: %.c |
Stefan Reinauer | 7b76912 | 2010-04-20 23:04:46 +0000 | [diff] [blame] | 63 | $(HOSTCC) -c $(HOSTCFLAGS) $(INCLUDES) -o $@ $< |
Uwe Hermann | 7eb845e | 2008-11-02 17:01:06 +0000 | [diff] [blame] | 64 | |
| 65 | clean: |
Uwe Hermann | 54c5276 | 2008-11-02 17:48:20 +0000 | [diff] [blame] | 66 | rm -f pbuilder *.o lzma/*.o |
Stefan Reinauer | 7b76912 | 2010-04-20 23:04:46 +0000 | [diff] [blame] | 67 | $(MAKE) -C liblar clean |
Uwe Hermann | 54c5276 | 2008-11-02 17:48:20 +0000 | [diff] [blame] | 68 | |