updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / seed7 / makefile.patch
blob1c136b19a9d9c92e1b50bb82ecdf42d838ed384f
1 --- a/seed7/src/mk_linux.mak 2011-03-06 05:51:35.000000000 -0500
2 +++ b/seed7/src/mk_linux.mak 2011-03-20 10:12:23.000000000 -0400
3 @@ -2,8 +2,12 @@
4 # To compile use a command shell and call:
5 # make -f mk_linux.mak depend
6 # make -f mk_linux.mak
7 +# To install use a command shell and call:
8 +# make -f mk_linux.mak install
9 # If you are under windows you should use MinGW with mk_mingw.mak, mk_nmake.mak or mk_msys.mak instead.
11 +DESTDIR =
12 +prefix = /usr
13 # CFLAGS =
14 # CFLAGS = -Wall -Wstrict-prototypes -Winline -Wconversion -Wshadow -Wpointer-arith
15 # CFLAGS = -O2 -fomit-frame-pointer -Wall -Wstrict-prototypes -Winline -Wconversion -Wshadow -Wpointer-arith
16 @@ -25,6 +29,12 @@
17 LIBS = -lX11 -lncurses -lm
18 # LIBS = -lX11 -lncurses -lm -lgmp
19 # LIBS = -lX11 -lncurses -lm_p -lc_p
20 +BIN_DIR = $(prefix)/bin
21 +BASE_DIR = $(prefix)/share/seed7
22 +LIB_DIR = $(BASE_DIR)/lib
23 +RLIB_DIR = $(BASE_DIR)/bin
24 +DOC_DIR = $(BASE_DIR)/doc
25 +PRG_DIR = $(BASE_DIR)/prg
26 SEED7_LIB = seed7_05.a
27 COMP_DATA_LIB = s7_data.a
28 COMPILER_LIB = s7_comp.a
29 @@ -116,6 +126,19 @@
30 clean:
31 rm -f *.o ../bin/*.a depend a_depend b_depend c_depend version.h
33 +install: ../bin/hi
34 + mkdir -p $(DESTDIR)$(BIN_DIR) $(DESTDIR)$(RLIB_DIR) $(DESTDIR)$(LIB_DIR) $(DESTDIR)$(DOC_DIR) $(DESTDIR)$(PRG_DIR)
35 + cp ../bin/hi $(DESTDIR)$(BIN_DIR)/hi
36 + cp -t $(DESTDIR)$(RLIB_DIR) ../bin/*.a
37 + cp -t $(DESTDIR)$(DOC_DIR) ../doc/*
38 + cp -t $(DESTDIR)$(LIB_DIR) ../lib/*.s7i
39 + cp -t $(DESTDIR)$(PRG_DIR) ../prg/*
40 + rm $(DESTDIR)$(PRG_DIR)/hi
42 +uninstall:
43 + rm -r $(BASEDIR)
44 + rm $(prefix)/bin/hi
46 dep: depend
48 strip:
49 @@ -165,10 +188,10 @@
50 echo "#define LINKER_OPT_OUTPUT_FILE \"-o \"" >> version.h
51 echo "#define LINKER_FLAGS \"$(LDFLAGS)\"" >> version.h
52 echo "#define SYSTEM_LIBS \"$(LIBS)\"" >> version.h
53 - cd ../bin; echo "#define SEED7_LIB \"`pwd`/$(SEED7_LIB)\"" >> ../src/version.h; cd ../src
54 - cd ../bin; echo "#define COMP_DATA_LIB \"`pwd`/$(COMP_DATA_LIB)\"" >> ../src/version.h; cd ../src
55 - cd ../bin; echo "#define COMPILER_LIB \"`pwd`/$(COMPILER_LIB)\"" >> ../src/version.h; cd ../src
56 - cd ../lib; echo "#define SEED7_LIBRARY \"`pwd`\"" >> ../src/version.h; cd ../src
57 + cd ../bin; echo "#define SEED7_LIB \"$(RLIB_DIR)/$(SEED7_LIB)\"" >> ../src/version.h; cd ../src
58 + cd ../bin; echo "#define COMP_DATA_LIB \"$(RLIB_DIR)/$(COMP_DATA_LIB)\"" >> ../src/version.h; cd ../src
59 + cd ../bin; echo "#define COMPILER_LIB \"$(RLIB_DIR)/$(COMPILER_LIB)\"" >> ../src/version.h; cd ../src
60 + cd ../lib; echo "#define SEED7_LIBRARY \"$(LIB_DIR)\"" >> ../src/version.h; cd ../src
62 depend: a_depend b_depend c_depend version.h
63 $(CC) $(CFLAGS) -M $(SRC) > depend