Started building the make structure.
This commit is contained in:
parent
98271437cb
commit
35af32a3a6
|
@ -0,0 +1,57 @@
|
||||||
|
# 15 april 2015
|
||||||
|
|
||||||
|
OBJDIR = .obj
|
||||||
|
|
||||||
|
# windows does this so :/
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
OS = windows
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef OS
|
||||||
|
UNAME = $(shell uname -s)
|
||||||
|
ifeq ($(UNAME),Darwin)
|
||||||
|
OS = darwin
|
||||||
|
else
|
||||||
|
OS = unix
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
CFILES = \
|
||||||
|
stack.c \
|
||||||
|
test.c
|
||||||
|
HFILES = \
|
||||||
|
ui.h \
|
||||||
|
uipriv.h \
|
||||||
|
ui_$(OS).h \
|
||||||
|
$(OS)/uipriv_$(OS).h
|
||||||
|
|
||||||
|
xCFLAGS = \
|
||||||
|
-g \
|
||||||
|
-Wall -Wextra \
|
||||||
|
-Wno-unused-parameter \
|
||||||
|
--std=c99 \
|
||||||
|
$(CFLAGS)
|
||||||
|
xLDFLAGS = \
|
||||||
|
-g \
|
||||||
|
$(LDFLAGS)
|
||||||
|
|
||||||
|
include $(OS)/GNUmakeinc.mk
|
||||||
|
xOSCFILES = $(OSCFILES:%=$(OS)/%)
|
||||||
|
|
||||||
|
OFILES = $(CFILES:%.c=$(OBJDIR)/%.o) \
|
||||||
|
$(xOSCFILES:$(OS)/%.c=$(OBJDIR)/%_$(OS).o)
|
||||||
|
|
||||||
|
$(OUT): $(OFILES)
|
||||||
|
$(CC) -o $(OUT) $(OFILES) $(xLDFLAGS)
|
||||||
|
|
||||||
|
$(OBJDIR)/%.o: %.c $(OBJDIR) $(HFILES)
|
||||||
|
$(CC) -o $@ -c $< $(xCFLAGS)
|
||||||
|
|
||||||
|
$(OBJDIR)/%_$(OS).o: $(OS)/%.c $(OBJDIR) $(HFILES)
|
||||||
|
$(CC) -o $@ -c $< $(xCFLAGS)
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
mkdir -p $(OBJDIR)
|
||||||
|
|
||||||
|
ui.h: ui.idl
|
||||||
|
idl2h < ui.h > ui.idl
|
|
@ -0,0 +1,33 @@
|
||||||
|
OSCFILES = \
|
||||||
|
alloc.c \
|
||||||
|
button.c \
|
||||||
|
checkbox.c \
|
||||||
|
comctl32.c \
|
||||||
|
debug.c \
|
||||||
|
entry.c \
|
||||||
|
init.c \
|
||||||
|
label.c \
|
||||||
|
main.c \
|
||||||
|
newcontrol.c \
|
||||||
|
parent.c \
|
||||||
|
tab.c \
|
||||||
|
text.c \
|
||||||
|
util.c \
|
||||||
|
window.c
|
||||||
|
|
||||||
|
xLDFLAGS += \
|
||||||
|
-luser32 -lkernel32 -lgdi32 -luxtheme -lmsimg32 -lcomdlg32 -lole32 -loleaut32 -loleacc -luuid
|
||||||
|
|
||||||
|
OUT = new.exe
|
||||||
|
|
||||||
|
ifeq ($(ARCH),64)
|
||||||
|
CC = x86_64-w64-mingw32-gcc
|
||||||
|
RC = x86_64-w64-mingw32-windres
|
||||||
|
xCFLAGS += -m64
|
||||||
|
xLDFLAGS += -m64
|
||||||
|
else
|
||||||
|
CC = i686-w64-mingw32-gcc
|
||||||
|
RC = i686-w64-mingw32-windres
|
||||||
|
xCFLAGS += -m32
|
||||||
|
xLDFLAGS += -m32
|
||||||
|
endif
|
Loading…
Reference in New Issue