Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | # |
michael@0 | 2 | # iniparser Makefile |
michael@0 | 3 | # |
michael@0 | 4 | |
michael@0 | 5 | # source files |
michael@0 | 6 | SRCS = iniparser.c \ |
michael@0 | 7 | dictionary.c |
michael@0 | 8 | |
michael@0 | 9 | # include rules for platform determination |
michael@0 | 10 | include platform.mk |
michael@0 | 11 | |
michael@0 | 12 | # flags for the the various systems |
michael@0 | 13 | ifeq ($(UNAME), Linux) |
michael@0 | 14 | # Compiler settings |
michael@0 | 15 | CC = gcc |
michael@0 | 16 | AR = ar |
michael@0 | 17 | ARFLAGS = rcv |
michael@0 | 18 | SHLD = ${CC} ${CFLAGS} |
michael@0 | 19 | CFLAGS = -O2 -fPIC -Wall -ansi -pedantic |
michael@0 | 20 | LDSHFLAGS = -shared -Wl,-Bsymbolic -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib |
michael@0 | 21 | LDFLAGS = -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib |
michael@0 | 22 | endif |
michael@0 | 23 | ifeq ($(UNAME), Darwin) |
michael@0 | 24 | # Compiler settings |
michael@0 | 25 | CC = gcc |
michael@0 | 26 | # Ar settings to build the library |
michael@0 | 27 | AR = ar |
michael@0 | 28 | ARFLAGS = rcv |
michael@0 | 29 | SHLD = libtool |
michael@0 | 30 | CFLAGS = -v -arch i386 -fPIC -Wall -ansi -pedantic |
michael@0 | 31 | LDFLAGS = -arch_only i386 |
michael@0 | 32 | endif |
michael@0 | 33 | ifeq ($(WIN32), 1) |
michael@0 | 34 | CC = cl |
michael@0 | 35 | CFLAGS = //Od //D "_WIN32" //D "WIN32" //D "_CONSOLE" //D "_CRT_SECURE_NO_WARNINGS" //D "_UNICODE" //D "UNICODE" //Gm //EHsc //RTC1 //MDd //W3 //nologo //c //ZI //TC |
michael@0 | 36 | LDFLAGS = //OUT:"iniparser.lib" //NOLOGO |
michael@0 | 37 | LINK = lib |
michael@0 | 38 | RM = rm -f |
michael@0 | 39 | endif |
michael@0 | 40 | |
michael@0 | 41 | # windows build rules |
michael@0 | 42 | ifeq ($(WIN32), 1) |
michael@0 | 43 | |
michael@0 | 44 | COMPILE.c = $(CC) $(CFLAGS) -c |
michael@0 | 45 | OBJS = $(SRCS:.c=.obj) |
michael@0 | 46 | |
michael@0 | 47 | all: iniparser.obj dictionary.obj iniparser.lib |
michael@0 | 48 | |
michael@0 | 49 | iniparser.obj: dictionary.obj |
michael@0 | 50 | @($(CC) $(CFLAGS) iniparser.c) |
michael@0 | 51 | |
michael@0 | 52 | dictionary.obj: |
michael@0 | 53 | @(echo "compiling dictionary; WIN32: $(WIN32); platform: $(UNAME)") |
michael@0 | 54 | @($(CC) $(CFLAGS) dictionary.c) |
michael@0 | 55 | |
michael@0 | 56 | iniparser.lib: dictionary.obj iniparser.obj |
michael@0 | 57 | @(echo "linking $(OBJS)") |
michael@0 | 58 | @($(LINK) $(LDFLAGS) $(OBJS)) |
michael@0 | 59 | else |
michael@0 | 60 | |
michael@0 | 61 | # *nix (and Mac) build rules |
michael@0 | 62 | RM = rm -f |
michael@0 | 63 | COMPILE.c = $(CC) $(CFLAGS) -c |
michael@0 | 64 | OBJS = $(SRCS:.c=.o) |
michael@0 | 65 | |
michael@0 | 66 | all: libiniparser.a libiniparser.so |
michael@0 | 67 | |
michael@0 | 68 | .c.o: |
michael@0 | 69 | @(echo "platform: $(UNAME), WIN32=$(WIN32); compiling $< ...") |
michael@0 | 70 | @($(COMPILE.c) -o $@ $<) |
michael@0 | 71 | |
michael@0 | 72 | libiniparser.a: $(OBJS) |
michael@0 | 73 | @($(AR) $(ARFLAGS) libiniparser.a $(OBJS)) |
michael@0 | 74 | |
michael@0 | 75 | ifeq ($(UNAME), Linux) |
michael@0 | 76 | libiniparser.so: $(OBJS) |
michael@0 | 77 | @$(SHLD) $(LDSHFLAGS) -o $@.0 $(OBJS) $(LDFLAGS) |
michael@0 | 78 | else |
michael@0 | 79 | libiniparser.so: $(OBJS) |
michael@0 | 80 | @$(SHLD) -o $@.0 $(LDFLAGS) $(OBJS) |
michael@0 | 81 | endif |
michael@0 | 82 | endif |
michael@0 | 83 | |
michael@0 | 84 | clean: |
michael@0 | 85 | $(RM) $(OBJS) libiniparser.* |