]> git.pld-linux.org Git - packages/asap.git/blame - asap-make.patch
- new
[packages/asap.git] / asap-make.patch
CommitLineData
1bead6ad
JB
1--- asap-3.1.3/Makefile.orig 2012-09-08 11:07:08.000000000 +0200
2+++ asap-3.1.3/Makefile 2013-04-13 07:42:52.750361640 +0200
3@@ -1,11 +1,18 @@
4 prefix := /usr/local
5+libdir := $(prefix)/lib
6 srcdir := $(dir $(lastword $(MAKEFILE_LIST)))
7-CC = $(DO)gcc -s -O2 -Wall -o $@ $(if $(filter %.so,$@),-shared -fPIC) $(INCLUDEOPTS) $(filter %.c,$^)
8-AR = $(DO)ar rc $@ $^
9+CC=gcc
10+CFLAGS="-O2 -Wall"
11+LDFLAGS="-s"
12+LIBTOOL=libtool
13+COMPLINK = $(DO)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(if $(filter %.so,$@),-shared -fPIC) $(INCLUDEOPTS) $(CPPFLAGS) $(filter %.c,$^)
14+LTCOMPILE = $(DO)$(LIBTOOL) --mode=compile --tag=CC $(CC) -c $(CFLAGS) -o $@ $(INCLUDEOPTS) $(CPPFLAGS) $(filter %.c,$^)
15+LIBLINK = $(DO)$(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ -rpath $(libdir)
16 CITO = $(DO)cito.exe -o $@ $(patsubst %,-I %,$(sort $(dir $(filter-out %.ci,$^)))) $(filter %.ci,$^)
17 INSTALL = install
18 INSTALL_PROGRAM = mkdir -p $(DESTDIR)$(2) && $(INSTALL) $(1) $(DESTDIR)$(2)/$(1)
19 INSTALL_DATA = mkdir -p $(DESTDIR)$(2) && $(INSTALL) -m 644 $(1) $(DESTDIR)$(2)/$(1)
20+LTINSTALL = mkdir -p $(DESTDIR)$(2) && $(LIBTOOL) --mode=install $(INSTALL) $(1) $(DESTDIR)$(2)/$(1)
21 ASCIIDOC = $(DO)asciidoc -o - $(1) $< | sed -e "s/527bbd;/c02020;/" | xmllint --valid --nonet -o $@ -
22 SDL_CFLAGS = `sdl-config --cflags`
23 SDL_LIBS = `sdl-config --libs`
24@@ -27,7 +34,7 @@
25 CLEAN :=
26 CLEANDIR :=
27
28-all: asapconv libasap.a
29+all: asapconv libasap.la
30 .PHONY: all
31
32 install: install-asapconv install-lib
33@@ -41,7 +48,7 @@
34 # asapconv
35
36 asapconv: $(call src,asapconv.c asap.[ch])
37- $(CC)
38+ $(COMPLINK)
39 CLEAN += asapconv
40
41 install-asapconv: asapconv
42@@ -54,20 +61,20 @@
43
44 # lib
45
46-lib: libasap.a
47+lib: libasap.la
48 .PHONY: lib
49
50-libasap.a: asap.o
51- $(AR)
52-CLEAN += libasap.a
53-
54-asap.o: $(call src,asap.[ch])
55- $(CC) -c
56-CLEAN += asap.o
57+libasap.la: asap.lo
58+ $(LIBLINK)
59+CLEAN += libasap.la
60+
61+asap.lo: $(call src,asap.[ch])
62+ $(LTCOMPILE)
63+CLEAN += asap.lo
64
65-install-lib: libasap.a $(srcdir)asap.h
66+install-lib: libasap.la $(srcdir)asap.h
67 $(call INSTALL_DATA,$(srcdir)asap.h,$(prefix)/include)
68- $(call INSTALL_DATA,libasap.a,$(prefix)/lib)
69+ $(call LTINSTALL,libasap.la,$(libdir))
70 .PHONY: install-lib
71
72 uninstall-lib:
73@@ -77,7 +84,7 @@
74 # SDL
75
76 asap-sdl: $(call src,asap-sdl.c asap.[ch])
77- $(CC) $(SDL_CFLAGS) $(SDL_LIBS)
78+ $(COMPLINK) $(SDL_CFLAGS) $(SDL_LIBS)
79 CLEAN += asap-sdl
80
81 install-sdl: asap-sdl
82@@ -91,7 +98,7 @@
83 # asapscan
84
85 asapscan: $(srcdir)asapscan.c asap-asapscan.h
86- $(CC)
87+ $(COMPLINK)
88 CLEAN += asapscan asapscan.exe
89
90 asap-asapscan.h: $(call src,asap.ci asap6502.ci asapinfo.ci cpu6502.ci pokey.ci) $(ASM6502_PLAYERS_OBX) | asap-asapscan.c
This page took 0.092756 seconds and 4 git commands to generate.