aboutsummaryrefslogtreecommitdiff
path: root/jindroush/chkbas/Makefile
blob: 18b1d757f00d5bdcf05383e0864e5fb920d21fc8 (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
50
51
52
53
54
55
56
57
58
59
60
61
#=====================================================================
PRGNAME		= chkbas

all: $(PRGNAME)

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

rel_strip:
	@strip $(PRGNAME).exe

rel_inst:
	@copy $(PRGNAME).exe $(ATAROOT)\\bin
	@echo RELEASE: Installed.

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

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

#=====================================================================
INCLUDES =	makefile		\
		basic.h			\
		basic_tb.h		\
		basic_xl.h		\
		basic_xe.h		\
		carray.h	\
		wintypes.h	


OBJECTS =	chkbas.o	\
		carray.o	\
		strlwr.o

#=====================================================================
CC		= g++
LD		= g++
LDLIBS		= -lm -L../lib -ljindroush
CPPFLAGS=-I../include $(COPT)
COPT=-O2

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

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

chkbas.o: chkbas.cpp switches.cpp

%.o:%.cpp $(INCLUDES) switches.cpp
	$(CC) $(CPPFLAGS) $(CFLAGS) $< -o $@

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