OpenCores
URL https://opencores.org/ocsvn/usb_fpga_2_16/usb_fpga_2_16/trunk

Subversion Repositories usb_fpga_2_16

[/] [usb_fpga_2_16/] [trunk/] [bmp/] [Makefile] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ZTEX
# Copyright (C) 1999-2011 Stefan Ziegenbalg
2
#
3
# main targets:
4
#   all             build bmp
5
#   install         install applications
6
#   install2        install applications to ../bin
7
#   uninstall       uninstall applications
8
#   resetconf       reset configuration
9
#   clean           clean everything but exe's
10
#   distclean       clean everything
11
 
12
#########################
13
# configuration section #
14
#########################
15
#OS  operating system (UNIX for unix like OS)
16
#default: detected automatically
17
#e.g. OS=UNIX
18
 
19
#PCEXTRAFLAGS  additional flags
20
#e.g. PCEXTRAFLAGS=-Xs
21
PCEXTRAFLAGS=-gl
22
 
23
#PREFIX  base directory for installing
24
#default: /usr/local for OS=UNIX and c:\usr else
25
#e.g. PREFIX=/usr
26
 
27
#BINDIR  where to install bin's
28
#default: $(PREFIX)/bin
29
#e.g. BINDIR=/usr/bin
30
 
31
#MANDIR  where to install mans's
32
#default: $(PREFIX)/share/man/man1
33
 
34
################################
35
# DO NOT CHANAGE THE FOLLOWING #
36
################################
37
ifndef OS
38
ifeq ($(WINDIR),)
39
OS=UNIX
40
else
41
OS=WINDOS
42
endif
43
endif
44
 
45
SOURCES=src/bmp.pas src/bmpsys.pas src/textbuf.pas
46
 
47
UNITS=-Fusrc
48
 
49
PCFLAGS:=-Scgm -O3rGp3 -FE. -Xs $(PCEXTRAFLAGS)
50
INSTALLDIR=$(INSTALL) -d
51
INSTALLEXE=$(INSTALL) -m 0755
52
INSTALLFILE=$(INSTALL) -m 0644
53
RM=rm -f
54
ECHO=echo
55
 
56
ifeq ($(OS),UNIX)
57
 
58
CONFIGURESCRIPT=./configure
59
PC:=$(shell $(CONFIGURESCRIPT) pc "$(PCFLAGS)")
60
ifndef PC
61
    $(error Fatal: No correct compiler found or wrong flags)
62
endif
63
INSTALL=$(shell $(CONFIGURESCRIPT) install2)
64
 
65
ifndef PREFIX
66
  PREFIX=/usr/local
67
endif
68
 
69
TARGETS=bmp
70
DEFS=-DUNIX
71
 
72
else
73
 
74
PC=ppc386
75
INSTALL=install
76
 
77
ifndef PREFIX
78
  PREFIX=c:\usr
79
endif
80
 
81
TARGETS=bmp.exe
82
DEFS=-DWINDOWS
83
 
84
endif
85
 
86
ifndef BINDIR
87
  BINDIR=$(DESTDIR)$(PREFIX)/bin
88
endif
89
 
90
ifndef MANDIR
91
  MANDIR=$(DESTDIR)$(PREFIX)/share/man/man1
92
endif
93
 
94
.PHONY: all install uninstall resetconf clean distclean
95
 
96
all: bmp.made
97
 
98
bmp.made: $(TARGETS)
99
        $(ECHO) > bmp.made
100
 
101
bmp bmp.exe: $(SOURCES)
102
        $(PC) $(PCFLAGS) $(UNITS) src/bmp.pas
103
 
104
install: $(TARGETS)
105
        $(INSTALLDIR) $(BINDIR)
106
        $(INSTALLEXE) $(TARGETS) $(BINDIR)
107
        $(INSTALLDIR) $(MANDIR)
108
        $(INSTALLFILE) bmp.1 $(MANDIR)
109
 
110
install2: $(TARGETS)
111
        $(INSTALLEXE) $(TARGETS) ../bin
112
 
113
uninstall:
114
        - $(RM) $(addprefix $(BINDIR)/,$(TARGETS))
115
 
116
resetconf:
117
        - $(RM) Makefile.conf
118
        - $(RM) conf_*
119
 
120
clean:
121
        - $(RM) *.bak *.o *.ppu *.s */*.bak *.log *.a *~ */*~ *.out
122
        - $(RM) ppas.sh link.res
123
 
124
 
125
distclean: clean resetconf
126
        - $(RM) bmp bmp.exe bmp.made bmp.pas

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.