aboutsummaryrefslogtreecommitdiff
path: root/jindroush/aext/Makefile
blob: 4d016e66fca8c32b8207107bad193ec33b7807c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#=====================================================================
PRGNAME		= aext

DESTDIR=
PREFIX=/usr

LDLIBS=-L../lib -ljindroush
INCPATH=-I../include

all: $(PRGNAME)

release:
	@$(MAKE) $(PRGNAME) CFLAGS="-c -O2 -Wall -D__CDISK_SAVE__" LDFLAGS=""
	@echo RELEASE: Compiled.

rel_strip: release
	@strip $(PRGNAME)

install: rel_strip
	cp $(PRGNAME) $(DESTDIR)/$(PREFIX)/bin/
	@echo RELEASE: Installed.

debug:
	@$(MAKE) $(PRGNAME) CFLAGS="-c -g -Wall -D_DEBUG -D__CDISK_SAVE__" LDFLAGS="-g"
	@echo DEBUG: Compiled.

clean:
	rm -rf *.o $(PRGNAME) $(PRGNAME).exe switches.cpp
	@echo DEBUG: Cleaned.


OBJECTS = aext.o

#=====================================================================
CXX		= g++
LD		= g++
CPPFLAGS=$(COPT)
COPT=-O2

#=====================================================================

$(PRGNAME) : $(OBJECTS)
	$(LD) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $(PRGNAME)

%.o : %.cpp switches.cpp
	$(CXX) $(INCPATH) $(CPPFLAGS) -c $< -o $@

switches.cpp : switches.def ../switches.pl
	perl ../switches.pl $< $@