-
Notifications
You must be signed in to change notification settings - Fork 24
/
GccDos.mak
53 lines (35 loc) · 1019 Bytes
/
GccDos.mak
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
# This makefile creates the JWasm 32-bit DOS binary with DJGPP.
# 'make -f GccDos.mak'
name = jwasm
ifndef DEBUG
DEBUG=0
endif
inc_dirs = -Isrc/H
#cflags stuff
ifeq ($(DEBUG),1)
extra_c_flags = -DDEBUG_OUT -g
OUTD=build\DJGPPd
else
extra_c_flags = -DNDEBUG -O2
OUTD=build\DJGPPr
endif
c_flags = $(extra_c_flags)
CC=gcc.exe -c $(inc_dirs) $(c_flags)
$(OUTD)/%.o: src/%.c
$(CC) -o $(OUTD)/$*.o $<
include gccmod.inc
TARGET1=$(OUTD)/$(name).exe
ALL: $(OUTD) $(TARGET1)
$(OUTD):
mkdir $(OUTD)
$(OUTD)/$(name).exe : $(OUTD)/main.o $(proj_obj)
gcc.exe $(OUTD)/main.o $(proj_obj) -s -o $(OUTD)/$(name).exe -Wl,-Map,$(OUTD)/$(name).map
$(OUTD)/msgtext.o: src/msgtext.c src/H/msgdef.h src/H/globals.h
$(CC) -o $(OUTD)/msgtext.o src/msgtext.c
$(OUTD)/reswords.o: src/reswords.c src/H/instruct.h src/H/special.h src/H/directve.h
$(CC) -o $(OUTD)/reswords.o src/reswords.c
######
clean:
@erase $(OUTD)\*.exe
@erase $(OUTD)\*.obj
@erase $(OUTD)\*.map